[pypy-svn] r66081 - pypy/branch/pyjitpl5/pypy/rpython/module/test

arigo at codespeak.net arigo at codespeak.net
Tue Jun 30 16:40:38 CEST 2009


Author: arigo
Date: Tue Jun 30 16:40:36 2009
New Revision: 66081

Added:
   pypy/branch/pyjitpl5/pypy/rpython/module/test/test_posix.py.merge.tmp
      - copied, changed from r66039, pypy/branch/pyjitpl5/pypy/rpython/module/test/test_posix.py
Log:
merging of svn+ssh://codespeak.net/svn/pypy/trunk/pypy/rpython/module/test/test_posix.py
revisions 62865 to 66039:

    ------------------------------------------------------------------------
    r64532 | fijal | 2009-04-21 17:57:16 +0200 (Tue, 21 Apr 2009) | 2 lines
    
    os.chown
    
    ------------------------------------------------------------------------


Copied: pypy/branch/pyjitpl5/pypy/rpython/module/test/test_posix.py.merge.tmp (from r66039, pypy/branch/pyjitpl5/pypy/rpython/module/test/test_posix.py)
==============================================================================
--- pypy/branch/pyjitpl5/pypy/rpython/module/test/test_posix.py	(original)
+++ pypy/branch/pyjitpl5/pypy/rpython/module/test/test_posix.py.merge.tmp	Tue Jun 30 16:40:36 2009
@@ -105,6 +105,22 @@
         res = self.interpret(f,[fi,20])
         assert self.ll_to_string(res) == text
 
+    if hasattr(os, 'chown'):
+        def test_chown(self):
+            f = open(path, "w")
+            f.write("xyz")
+            f.close()
+            def f():
+                try:
+                    posix.chown(path, os.getuid(), os.getgid())
+                    return 1
+                except OSError:
+                    return 2
+            
+            assert self.interpret(f, []) == 1
+            os.unlink(path)
+            assert self.interpret(f, []) == 2
+    
     def test_close(self):
         def f(fi):
             return posix.close(fi)
@@ -183,3 +199,6 @@
 
     def test_stat(self):
         py.test.skip("ootypesystem does not support os.stat")
+
+    def test_chown(self):
+        py.test.skip("ootypesystem does not support os.chown")



More information about the Pypy-commit mailing list