summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_cmd_line.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_cmd_line.py')
-rw-r--r--Lib/test/test_cmd_line.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py
index cb9bbdd..0feb63f 100644
--- a/Lib/test/test_cmd_line.py
+++ b/Lib/test/test_cmd_line.py
@@ -8,8 +8,8 @@ import shutil
import sys
import subprocess
import tempfile
-from test import script_helper
-from test.script_helper import (spawn_python, kill_python, assert_python_ok,
+from test.support import script_helper
+from test.support.script_helper import (spawn_python, kill_python, assert_python_ok,
assert_python_failure)
@@ -59,7 +59,7 @@ class CmdLineTest(unittest.TestCase):
def test_xoptions(self):
def get_xoptions(*args):
- # use subprocess module directly because test.script_helper adds
+ # use subprocess module directly because test.support.script_helper adds
# "-X faulthandler" to the command line
args = (sys.executable, '-E') + args
args += ('-c', 'import sys; print(sys._xoptions)')
@@ -344,7 +344,8 @@ class CmdLineTest(unittest.TestCase):
# Issue #5319: if stdout.flush() fails at shutdown, an error should
# be printed out.
code = """if 1:
- import os, sys
+ import os, sys, test.support
+ test.support.SuppressCrashReport().__enter__()
sys.stdout.write('x')
os.close(sys.stdout.fileno())"""
rc, out, err = assert_python_ok('-c', code)
@@ -444,7 +445,7 @@ class CmdLineTest(unittest.TestCase):
self.assertEqual(err.splitlines().count(b'Unknown option: -a'), 1)
self.assertEqual(b'', out)
- @unittest.skipIf(script_helper._interpreter_requires_environment(),
+ @unittest.skipIf(script_helper.interpreter_requires_environment(),
'Cannot run -I tests when PYTHON env vars are required.')
def test_isolatedmode(self):
self.verify_valid_flag('-I')