Author: Brian Kearns <[email protected]>
Branch: use-file-star-for-file
Changeset: r73519:28cc8dda39ba
Date: 2014-09-12 16:57 -0700
http://bitbucket.org/pypy/pypy/changeset/28cc8dda39ba/
Log: these tests crash interpreter in win32 vm
diff --git a/pypy/module/_file/test/test_file.py
b/pypy/module/_file/test/test_file.py
--- a/pypy/module/_file/test/test_file.py
+++ b/pypy/module/_file/test/test_file.py
@@ -236,12 +236,14 @@
data = f.read()
assert data == "15"
+ @py.test.mark.skipif("sys.platform == 'win32'")
def test_exception_from_close(self):
import os
f = self.file(self.temppath, 'w')
os.close(f.fileno())
raises(IOError, f.close) # bad file descriptor
+ @py.test.mark.skipif("sys.platform == 'win32'")
def test_exception_from_del(self):
import os, gc, sys, cStringIO
f = self.file(self.temppath, 'w')
diff --git a/rpython/rlib/test/test_rfile.py b/rpython/rlib/test/test_rfile.py
--- a/rpython/rlib/test/test_rfile.py
+++ b/rpython/rlib/test/test_rfile.py
@@ -293,7 +293,7 @@
f()
self.interpret(f, [])
- def test_fdopen(self):
+ def test_fdopen_normal(self):
fname = str(self.tmpdir.join('file_4a'))
def f():
@@ -310,6 +310,17 @@
f2.write("xxx")
f2.close()
+ f()
+ assert open(fname).read() == "xxx"
+ self.interpret(f, [])
+ assert open(fname).read() == "xxx"
+
+ @py.test.mark.skipif("sys.platform == 'win32'")
+ def test_fdopen_errors(self):
+ fname = str(self.tmpdir.join('file'))
+
+ def f():
+ open(fname, 'w').close()
fd = os.open(fname, os.O_RDONLY, 0777)
f = os.fdopen(fd, 'r')
os.close(fd)
@@ -336,9 +347,7 @@
assert False
f()
- assert open(fname).read() == "xxx"
self.interpret(f, [])
- assert open(fname).read() == "xxx"
def test_fileno(self):
fname = str(self.tmpdir.join('file_5'))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit