MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_enable_file

Method test_enable_file

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

Source from the content-addressed store, hash-verified

346
347 @skip_segfault_on_android
348 def test_enable_file(self):
349 with temporary_filename() as filename:
350 self.check_fatal_error("""
351 import faulthandler
352 output = open({filename}, 'wb')
353 faulthandler.enable(output)
354 faulthandler._sigsegv()
355 """.format(filename=repr(filename)),
356 4,
357 'Segmentation fault',
358 filename=filename)
359
360 @unittest.skipIf(sys.platform == "win32",
361 "subprocess doesn't support pass_fds on Windows")

Callers

nothing calls this directly

Calls 4

check_fatal_errorMethod · 0.95
temporary_filenameFunction · 0.85
reprFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected