Debian Codegraph @

pypy/module/faulthandler/test/test_faulthander.py

raw symbols SCIP
1 import pytest
2 import sys
3
4 if sys.platform == 'win32':
5 pytest.skip("missing details to make faulthandler work on windows")
6
7 class AppTestFaultHandler:
8 spaceconfig = {
9 "usemodules": ["faulthandler", "_vmprof"]
10 }
11
12 def test_enable(self):
13 import faulthandler, sys
14 faulthandler.enable()
15 assert faulthandler.is_enabled() is True
16 faulthandler.enable(file=sys.stderr, all_threads=True)
17 faulthandler.disable()
18 assert faulthandler.is_enabled() is False
19
20 def test_dump_traceback(self):
21 import faulthandler, sys
22 faulthandler.dump_traceback()
23 faulthandler.dump_traceback(file=sys.stderr, all_threads=True)