diff options
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-x | Lib/test/regrtest.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 27b2b03955..dbaee75624 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -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: |