diff options
author | Gregory P. Smith <greg@krypto.org> | 2015-01-23 06:56:06 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2015-01-23 06:56:06 (GMT) |
commit | d775bcabe7c73ec10598e50c01586d470374baff (patch) | |
tree | 7b0d8802c7a21085d63b7e901b96ee4488cb9a72 /Lib/test | |
parent | d16478095c18f883cef7d34482a2e27b5b8a87f2 (diff) | |
parent | 48e810069ddc725903588c9609ac84900ee65b4c (diff) | |
download | cpython-d775bcabe7c73ec10598e50c01586d470374baff.zip cpython-d775bcabe7c73ec10598e50c01586d470374baff.tar.gz cpython-d775bcabe7c73ec10598e50c01586d470374baff.tar.bz2 |
revert 7b833bd1f509. I misread the side effect that the code was triggering.
*any* kwarg supplied to _assert_python causes it to not append -E to the
command line flags so without='-E' does effectively work.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_cmd_line.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py index c862b20..327c145 100644 --- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -426,11 +426,13 @@ class CmdLineTest(unittest.TestCase): self.assertIn(b'Unknown option: -z', err) self.assertEqual(err.splitlines().count(b'Unknown option: -z'), 1) self.assertEqual(b'', out) - rc, out, err = assert_python_failure('-z') + # Add "without='-E'" to prevent _assert_python to append -E + # to env_vars and change the output of stderr + rc, out, err = assert_python_failure('-z', without='-E') self.assertIn(b'Unknown option: -z', err) self.assertEqual(err.splitlines().count(b'Unknown option: -z'), 1) self.assertEqual(b'', out) - rc, out, err = assert_python_failure('-a', '-z') + rc, out, err = assert_python_failure('-a', '-z', without='-E') self.assertIn(b'Unknown option: -a', err) # only the first unknown option is reported self.assertNotIn(b'Unknown option: -z', err) |