[pypy-commit] pypy default: On Windows, tests using os.open with mode 0 create a read-only file, which then is harder to remove.

ctismer noreply at buildbot.pypy.org
Sat Mar 24 00:59:22 CET 2012


Author: Christian Tismer <tismer at stackless.com>
Branch: 
Changeset: r53959:fb4a283cefc4
Date: 2012-03-24 00:58 +0100
http://bitbucket.org/pypy/pypy/changeset/fb4a283cefc4/

Log:	On Windows, tests using os.open with mode 0 create a read-only file,
	which then is harder to remove.

diff --git a/pypy/translator/test/test_unsimplify.py b/pypy/translator/test/test_unsimplify.py
--- a/pypy/translator/test/test_unsimplify.py
+++ b/pypy/translator/test/test_unsimplify.py
@@ -78,7 +78,7 @@
             return x * 6
         def hello_world():
             if we_are_translated():
-                fd = os.open(tmpfile, os.O_WRONLY | os.O_CREAT, 0)
+                fd = os.open(tmpfile, os.O_WRONLY | os.O_CREAT, 0644)
                 os.close(fd)
         graph, t = translate(f, [int], type_system)
         call_initial_function(t, hello_world)
@@ -97,7 +97,7 @@
             return x * 6
         def goodbye_world():
             if we_are_translated():
-                fd = os.open(tmpfile, os.O_WRONLY | os.O_CREAT, 0)
+                fd = os.open(tmpfile, os.O_WRONLY | os.O_CREAT, 0644)
                 os.close(fd)
         graph, t = translate(f, [int], type_system)
         call_final_function(t, goodbye_world)


More information about the pypy-commit mailing list