[Python-Dev] Test breakage due to optparse (original) (raw)

Tim Peters tim.peters at gmail.com
Sat Jul 31 22:24:52 CEST 2004


Heads up. Recent changes to optparse and/or to its test are causing several spurious test failures, Here's a minimal incantation to get the first new failure of this kind:

C:\Code\python\PCbuild>python -E -tt ../lib/test/regrtest.py test_optparse test_pep277 test_optparse test_pep277 test test_pep277 produced unexpected output:


*** lines 2-4 of actual output doesn't appear in expected output after line 1:


1 test OK. 1 test failed: test_pep277

In all, with a complete test run, there are 15 spurious test failures on Windows now:

15 tests failed: test_pep277 test_pkg test_popen test_popen2 test_profile test_pyexpat test_regex test_rgbimg test_rotor test_scope test_thread test_threadedtempfile test_tokenize test_winreg test_xreadline

No idea why. Offhand, from the symptoms it looks like a change may be sending stdout into a black hole. Constructs like

      sys.stdout = StringIO()

! self.assertRaises(self.parser.parse_args, (cmdline_args,), None, ! SystemExit, expected_output, ! self.redirected_stdout) sys.stdout = sys.stdout

in the patch certainly intensify that suspicion .



More information about the Python-Dev mailing list