# HG changeset patch # User James McKay # Date 1278276102 -3600 # Node ID c38fe89a5cbce2dc4f5ffa002e6e36eda4623114 # Parent 4375d37fea1e4a6de34c726428db695fcf92f535 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 diff --git a/tests/run.py b/tests/run.py --- 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']