MCPcopy Index your code
hub / github.com/python/cpython / test_enable_file

Method test_enable_file

Lib/test/test_faulthandler.py:324–334  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

322
323 @skip_segfault_on_android
324 def test_enable_file(self):
325 with temporary_filename() as filename:
326 self.check_fatal_error("""
327 import faulthandler
328 output = open({filename}, 'wb')
329 faulthandler.enable(output)
330 faulthandler._sigsegv()
331 """.format(filename=repr(filename)),
332 4,
333 'Segmentation fault',
334 filename=filename)
335
336 @unittest.skipIf(sys.platform == "win32",
337 "subprocess doesn't support pass_fds on Windows")

Callers

nothing calls this directly

Calls 3

check_fatal_errorMethod · 0.95
temporary_filenameFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected