[Python-checkins] r75966 - in python/branches/py3k/Lib/test: regrtest.py test_uuid.py
antoine.pitrou
python-checkins at python.org
Fri Oct 30 19:30:35 CET 2009
Author: antoine.pitrou
Date: Fri Oct 30 19:30:35 2009
New Revision: 75966
Log:
Followup to r75965: replace the test_uuid-specific patch with a generic fix
(other tests may have the same problem).
Modified:
python/branches/py3k/Lib/test/regrtest.py
python/branches/py3k/Lib/test/test_uuid.py
Modified: python/branches/py3k/Lib/test/regrtest.py
==============================================================================
--- python/branches/py3k/Lib/test/regrtest.py (original)
+++ python/branches/py3k/Lib/test/regrtest.py Fri Oct 30 19:30:35 2009
@@ -996,6 +996,12 @@
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()
Modified: python/branches/py3k/Lib/test/test_uuid.py
==============================================================================
--- python/branches/py3k/Lib/test/test_uuid.py (original)
+++ python/branches/py3k/Lib/test/test_uuid.py Fri Oct 30 19:30:35 2009
@@ -314,7 +314,6 @@
import sys
print(""" WARNING: uuid._ifconfig_getnode is unreliable on many platforms.
It is disabled until the code and/or test can be fixed properly.""", file=sys.__stdout__)
- sys.__stdout__.flush()
return
import os
@@ -343,7 +342,6 @@
import sys
print(""" WARNING: uuid._unixdll_getnode is unreliable on many platforms.
It is disabled until the code and/or test can be fixed properly.""", file=sys.__stdout__)
- sys.__stdout__.flush()
return
import os
@@ -359,7 +357,6 @@
import sys
print(""" WARNING: uuid.getnode is unreliable on many platforms.
It is disabled until the code and/or test can be fixed properly.""", file=sys.__stdout__)
- sys.__stdout__.flush()
return
node1 = uuid.getnode()
More information about the Python-checkins
mailing list