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

Method test_stderr_None

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

Source from the content-addressed store, hash-verified

837 sys.stderr = stderr
838
839 def test_stderr_None(self):
840 # Issue #21497: provide a helpful error if sys.stderr is None,
841 # instead of just an attribute error: "None has no attribute fileno".
842 with self.check_stderr_none():
843 faulthandler.enable()
844 with self.check_stderr_none():
845 faulthandler.dump_traceback()
846 with self.check_stderr_none():
847 faulthandler.dump_traceback_later(1e-3)
848 if hasattr(faulthandler, "register"):
849 with self.check_stderr_none():
850 faulthandler.register(signal.SIGUSR1)
851
852 @unittest.skipUnless(MS_WINDOWS, 'specific to Windows')
853 def test_raise_exception(self):

Callers

nothing calls this directly

Calls 3

check_stderr_noneMethod · 0.95
enableMethod · 0.45
registerMethod · 0.45

Tested by

no test coverage detected