diff tests/run.py @ 629:c38fe89a5cbc

tests: Use tempfile.TemporaryFile instead of os.tmpfile() to redirect stdout. os.tmpfile requires administrator privileges on Windows XP and may be blocked by UAC on Windows Vista/7. In any case, it is deprecated in favour of tempfile.TemporaryFile. See http://bugs.python.org/issue2232
author James McKay <code@jamesmckay.net>
date Sun, 04 Jul 2010 21:41:42 +0100
parents edd112855189
children 95abc4cfc78f
line wrap: on
line diff
--- a/tests/run.py
+++ b/tests/run.py
@@ -70,7 +70,8 @@ if __name__ == '__main__':
         demandimport.enable()
 
     # silence output when running outside nose
-    sys.stdout = os.tmpfile()
+    import tempfile
+    sys.stdout = tempfile.TemporaryFile()
 
     all = tests()
     del all['test_util']