[pypy-svn] r15141 - pypy/dist/pypy/tool/test

arigo at codespeak.net arigo at codespeak.net
Tue Jul 26 20:06:01 CEST 2005


Author: arigo
Date: Tue Jul 26 20:06:00 2005
New Revision: 15141

Modified:
   pypy/dist/pypy/tool/test/test_osfilewrapper.py
Log:
Fixed the test.


Modified: pypy/dist/pypy/tool/test/test_osfilewrapper.py
==============================================================================
--- pypy/dist/pypy/tool/test/test_osfilewrapper.py	(original)
+++ pypy/dist/pypy/tool/test/test_osfilewrapper.py	Tue Jul 26 20:06:00 2005
@@ -1,5 +1,5 @@
 import autopath
-from pypy.tool.osfilewrapper import OsFileWrapper 
+from pypy.tool.osfilewrapper import OsFileWrapper, create_wrapper
 from pypy.tool.udir import udir 
 import os
 
@@ -14,7 +14,7 @@
     f.close()
 
     for ii in range(10):
-        f = OsFileWrapper.create_wrapper(p, os.O_RDONLY)
+        f = create_wrapper(p, os.O_RDONLY)
         assert f.read(ii) == buf[:ii]
     
 def test_writes_reads():
@@ -23,10 +23,10 @@
     buf = "1234567890"
     for ii in range(10):
         p = str(udir.join('test.dat'))
-        f1 = OsFileWrapper.create_wrapper(p, os.O_WRONLY)
+        f1 = create_wrapper(p, os.O_WRONLY)
         f1.write(buf[:ii])
         f1.close()
 
-        f2 = OsFileWrapper.create_wrapper(p, os.O_RDONLY)
+        f2 = create_wrapper(p, os.O_RDONLY)
         assert f2.read(ii) == buf[:ii]
         f2.close()



More information about the Pypy-commit mailing list