diff options
Diffstat (limited to 'Lib/test/test_cmd_line.py')
-rw-r--r-- | Lib/test/test_cmd_line.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py index cb9bbdd..6ba929c 100644 --- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -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') |