mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
fix bug #42 reported by Andrew Dalke
The Compare close contains a close method that checks to see if there is any unconsumed data in the Compare instance; i.e. if the canonical output file contains more data than was produced by the current test run. This method was never called, allowing differences to go undetected. Fix is to call close after the test is run (after __import__) output/test_long and output/test_popen2 needed trivial changes output/test_select contained lots of text, but test_select.py produced no output
This commit is contained in:
parent
b35de5b78a
commit
fff9e20943
5 changed files with 2 additions and 27 deletions
|
@ -212,6 +212,8 @@ def runtest(test, generate, verbose, testdir = None):
|
|||
sys.stdout = cfp
|
||||
print test # Output file starts with test name
|
||||
__import__(test, globals(), locals(), [])
|
||||
if cfp and not (generate or verbose):
|
||||
cfp.close()
|
||||
finally:
|
||||
sys.stdout = save_stdout
|
||||
except ImportError, msg:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue