Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r61949:8785335d6ee8
Date: 2013-03-03 11:36 +0100
http://bitbucket.org/pypy/pypy/changeset/8785335d6ee8/
Log: Fix _io tests run with -A
diff --git a/pypy/module/_io/test/test_bufferedio.py
b/pypy/module/_io/test/test_bufferedio.py
--- a/pypy/module/_io/test/test_bufferedio.py
+++ b/pypy/module/_io/test/test_bufferedio.py
@@ -240,12 +240,10 @@
def setup_class(cls):
tmpfile = udir.join('tmpfile')
cls.w_tmpfile = cls.space.wrap(str(tmpfile))
- if cls.runappdirect:
- cls.w_readfile = tmpfile.read
- else:
- def readfile(space):
- return space.wrapbytes(tmpfile.read())
- cls.w_readfile = cls.space.wrap(interp2app(readfile))
+
+ def w_readfile(self):
+ with open(self.tmpfile, 'rb') as f:
+ return f.read()
def test_write(self):
import _io
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit