[Python-checkins] r75965 - python/branches/py3k/Lib/test/test_uuid.py

antoine.pitrou python-checkins at python.org
Fri Oct 30 19:15:03 CET 2009


Author: antoine.pitrou
Date: Fri Oct 30 19:15:02 2009
New Revision: 75965

Log:
Fix a refleak in test_uuid when run with -j. 
The "refleak" was simply the effect of internal buffering in block buffering mode
(rather than line buffering when sys.stdout is a terminal)



Modified:
   python/branches/py3k/Lib/test/test_uuid.py

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:15:02 2009
@@ -314,6 +314,7 @@
         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
@@ -342,6 +343,7 @@
         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
@@ -357,6 +359,7 @@
         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