Author: Matti Picus <[email protected]>
Branch: 
Changeset: r93959:d9e0d0815c04
Date: 2018-03-06 00:01 +0200
http://bitbucket.org/pypy/pypy/changeset/d9e0d0815c04/

Log:    reset ro to rw and unlink temp files

diff --git a/pypy/module/posix/test/test_posix2.py 
b/pypy/module/posix/test/test_posix2.py
--- a/pypy/module/posix/test/test_posix2.py
+++ b/pypy/module/posix/test/test_posix2.py
@@ -971,9 +971,12 @@
             if sys.platform == 'win32':
                 os.chmod(self.path, 0400)
                 assert (os.stat(self.path).st_mode & 0600) == 0400
+                os.chmod(self.path, 0700)
             else:
                 os.chmod(self.path, 0200)
                 assert (os.stat(self.path).st_mode & 0777) == 0200
+                os.chmod(self.path, 0700)
+            os.unlink(self.path)
 
     if hasattr(os, 'fchmod'):
         def test_fchmod(self):
@@ -983,6 +986,7 @@
             assert (os.fstat(f.fileno()).st_mode & 0777) == 0200
             f.close()
             assert (os.stat(self.path).st_mode & 0777) == 0200
+            os.unlink(self.path)
 
     if hasattr(os, 'mkfifo'):
         def test_mkfifo(self):
@@ -1186,6 +1190,7 @@
         os.rename(unicode_name, self.path)
         with open(self.path) as f:
             assert f.read() == 'this is a rename test'
+        os.unlink(self.path)
 
         
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to