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

Method test_sys_xoptions

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

Source from the content-addressed store, hash-verified

453
454 @support.requires_subprocess()
455 def test_sys_xoptions(self):
456 # Test python -X faulthandler
457 code = "import faulthandler; print(faulthandler.is_enabled())"
458 args = filter(None, (sys.executable,
459 "-E" if sys.flags.ignore_environment else "",
460 "-X", "faulthandler", "-c", code))
461 env = os.environ.copy()
462 env.pop("PYTHONFAULTHANDLER", None)
463 # don't use assert_python_ok() because it always enables faulthandler
464 output = subprocess.check_output(args, env=env)
465 self.assertEqual(output.rstrip(), b"True")
466
467 @support.requires_subprocess()
468 def test_env_var(self):

Callers

nothing calls this directly

Calls 6

filterFunction · 0.85
copyMethod · 0.45
popMethod · 0.45
check_outputMethod · 0.45
assertEqualMethod · 0.45
rstripMethod · 0.45

Tested by

no test coverage detected