summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_faulthandler.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-06-25 19:54:17 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-06-25 19:54:17 (GMT)
commitef8115e5ebcb316eade7346785eee533b07ef8e5 (patch)
tree85b8c56690f37e6e0f15dac4cac52c583d3a9a7e /Lib/test/test_faulthandler.py
parent383a820e0dd05273940c9513be7ee17d912aa54f (diff)
downloadcpython-ef8115e5ebcb316eade7346785eee533b07ef8e5.zip
cpython-ef8115e5ebcb316eade7346785eee533b07ef8e5.tar.gz
cpython-ef8115e5ebcb316eade7346785eee533b07ef8e5.tar.bz2
Issue #17206: Fix test_cmd_line and test_faulthandler for my previous change
(test.regrtest and test.script_helper enable faulthandler module in subprocesses).
Diffstat (limited to 'Lib/test/test_faulthandler.py')
-rw-r--r--Lib/test/test_faulthandler.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
index 2ddc7bc..0eba284 100644
--- a/Lib/test/test_faulthandler.py
+++ b/Lib/test/test_faulthandler.py
@@ -262,9 +262,11 @@ faulthandler._sigsegv()
def test_disabled_by_default(self):
# By default, the module should be disabled
code = "import faulthandler; print(faulthandler.is_enabled())"
- rc, stdout, stderr = assert_python_ok("-c", code)
- stdout = (stdout + stderr).strip()
- self.assertEqual(stdout, b"False")
+ args = (sys.executable, '-E', '-c', code)
+ # use subprocess module directly because test.script_helper adds
+ # "-X faulthandler" to the command line
+ stdout = subprocess.check_output(args)
+ self.assertEqual(stdout.rstrip(), b"False")
def test_sys_xoptions(self):
# Test python -X faulthandler