[Numpy-svn] r4671 - trunk/numpy/core/tests
numpy-svn at scipy.org
numpy-svn at scipy.org
Sun Dec 30 12:33:06 EST 2007
Author: stefan
Date: 2007-12-30 11:32:49 -0600 (Sun, 30 Dec 2007)
New Revision: 4671
Modified:
trunk/numpy/core/tests/test_multiarray.py
Log:
Workaround for TemporaryFile problem under Windows.
Modified: trunk/numpy/core/tests/test_multiarray.py
===================================================================
--- trunk/numpy/core/tests/test_multiarray.py 2007-12-30 11:13:45 UTC (rev 4670)
+++ trunk/numpy/core/tests/test_multiarray.py 2007-12-30 17:32:49 UTC (rev 4671)
@@ -499,7 +499,14 @@
self.dtype = np.complex
def test_file(self):
- f = tempfile.TemporaryFile()
+ # Python under Windows does not believe that TemporaryFile
+ # is an open file
+ if sys.platform.startswith('win'):
+ filename = tempfile.mktemp()
+ f = open(filename,'wb')
+ else:
+ f = tempfile.TemporaryFile()
+
self.x.tofile(f)
f.seek(0)
y = np.fromfile(f,dtype=self.dtype)
More information about the Numpy-svn
mailing list