mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
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.
This commit is contained in:
commit
d775bcabe7
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue