]> granicus.if.org Git - python/commitdiff
revert 7b833bd1f509. I misread the side effect that the code was triggering.
authorGregory P. Smith <greg@krypto.org>
Fri, 23 Jan 2015 06:55:00 +0000 (22:55 -0800)
committerGregory P. Smith <greg@krypto.org>
Fri, 23 Jan 2015 06:55:00 +0000 (22:55 -0800)
*any* kwarg supplied to _assert_python causes it to not append -E to the
command line flags so without='-E' does effectively work.

Lib/test/test_cmd_line.py

index c862b2078bec8614599b8a4b87a68484c51adb70..327c1455fcf741438d508947a2add4f89ccf4f3a 100644 (file)
@@ -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)