summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-10-30 18:30:35 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-10-30 18:30:35 (GMT)
commit046467cf9a5c0a5699d5a11381470076ae2a1c3d (patch)
tree933bd067d114ec1e7dc4a8b79a3f1718fd5fce52 /Lib/test/regrtest.py
parent1e8e5f0680b3014da460008b50bd1663cb1ef310 (diff)
downloadcpython-046467cf9a5c0a5699d5a11381470076ae2a1c3d.zip
cpython-046467cf9a5c0a5699d5a11381470076ae2a1c3d.tar.gz
cpython-046467cf9a5c0a5699d5a11381470076ae2a1c3d.tar.bz2
Followup to r75965: replace the test_uuid-specific patch with a generic fix
(other tests may have the same problem).
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 2b8a6a7..75a74fa 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -996,6 +996,12 @@ def dash_R_cleanup(fs, ps, pic, abcs):
obj._abc_cache.clear()
obj._abc_negative_cache.clear()
+ # Flush standard output, so that buffered data is sent to the OS and
+ # associated Python objects are reclaimed.
+ for stream in (sys.stdout, sys.stderr, sys.__stdout__, sys.__stderr__):
+ if stream is not None:
+ stream.flush()
+
# Clear assorted module caches.
_path_created.clear()
re.purge()