[pypy-svn] r73879 - in pypy/trunk/pypy/module/posix: . test

agaynor at codespeak.net agaynor at codespeak.net
Mon Apr 19 03:48:16 CEST 2010


Author: agaynor
Date: Mon Apr 19 03:48:14 2010
New Revision: 73879

Modified:
   pypy/trunk/pypy/module/posix/interp_posix.py
   pypy/trunk/pypy/module/posix/test/test_posix2.py
Log:
Fix os.unlink and os.remove, again.

Modified: pypy/trunk/pypy/module/posix/interp_posix.py
==============================================================================
--- pypy/trunk/pypy/module/posix/interp_posix.py	(original)
+++ pypy/trunk/pypy/module/posix/interp_posix.py	Mon Apr 19 03:48:14 2010
@@ -284,7 +284,7 @@
         os.unlink(path)
     except OSError, e: 
         raise wrap_oserror(space, e, path)
-unlink.unwrap_spec = [ObjSpace, str]
+unlink.unwrap_spec = [ObjSpace, 'path']
 
 def remove(space, path):
     """Remove a file (same as unlink(path))."""
@@ -292,7 +292,7 @@
         os.unlink(path)
     except OSError, e: 
         raise wrap_oserror(space, e, path)
-remove.unwrap_spec = [ObjSpace, str]
+remove.unwrap_spec = [ObjSpace, 'path']
 
 def _getfullpathname(space, path):
     """helper for ntpath.abspath """

Modified: pypy/trunk/pypy/module/posix/test/test_posix2.py
==============================================================================
--- pypy/trunk/pypy/module/posix/test/test_posix2.py	(original)
+++ pypy/trunk/pypy/module/posix/test/test_posix2.py	Mon Apr 19 03:48:14 2010
@@ -666,6 +666,13 @@
             self.posix.open(u"ą", self.posix.O_WRONLY)
         except OSError:
             pass
+    
+    def test_remove_unicode(self):
+        # See 2 above ;)
+        try:
+            self.posix.remove(u"ą")
+        except OSError:
+            pass
 
 
 class TestPexpect(object):



More information about the Pypy-commit mailing list