[pypy-dev] test_file fails, hard-coded tmp dir to blame?
abkhd at hotmail.com
Mon Jan 17 03:29:27 CET 2005
test_file fails at this end. It seems that it tries to create a '/tmp/tt'
file, but it fails. This is so because my temp directory is at
'/windows/temp' not '/tmp'.
If I correctly understand this problem, then find attached a fix that got
the test to pass. Hope that helps.
PS. In case the developers here are interested to know, all the tests pass
now on this box, including the JAVA and LISP ones which are made to use
Jikes (version 1.20) and GNU CLISP (version 2.33) on Win98, MinGW built
Python 126.96.36.199 (from CVS), and GCC 3.4.2 (MinGW special).
--- pypy/appspace/test/test_file.py (revision 8317)
+++ pypy/appspace/test/test_file.py (working copy)
@@ -16,8 +16,10 @@
assert self.fd.tell() == 0
- f=_file.file_('/tmp/tt', 'w')
- assert f.name == '/tmp/tt'
+ from tempfile import mktemp
+ fn = mktemp()
+ f=_file.file_(fn, 'w')
+ assert f.name == fn
assert f.mode == 'w'
assert f.closed == False
assert f.encoding == None # Fix when we find out what this is
Express yourself instantly with MSN Messenger! Download today it's FREE!
More information about the Pypy-dev