[pypy-commit] pypy default: Fix direct app-level test.
mjacob
pypy.commits at gmail.com
Sat Mar 4 06:06:39 EST 2017
Author: Manuel Jacob <me at manueljacob.de>
Branch:
Changeset: r90529:bdf68ecd0bac
Date: 2017-03-04 12:03 +0100
http://bitbucket.org/pypy/pypy/changeset/bdf68ecd0bac/
Log: Fix direct app-level test.
diff --git a/pypy/module/_io/test/test_fileio.py b/pypy/module/_io/test/test_fileio.py
--- a/pypy/module/_io/test/test_fileio.py
+++ b/pypy/module/_io/test/test_fileio.py
@@ -14,11 +14,10 @@
self.w_posix = self.space.appexec([], """():
import %s as m;
return m""" % os.name)
- def create_bigfile_w():
+ if meth == self.test_readinto_optimized:
bigfile = udir.join('bigfile')
bigfile.write('a' * 1000, mode='wb')
- return self.space.wrap(str(bigfile))
- self.w_create_bigfile = self.space.wrap(interp2app(create_bigfile_w))
+ self.w_bigfile = self.space.wrap(self.space.wrap(str(bigfile)))
def test_constructor(self):
import _io
@@ -163,7 +162,7 @@
def test_readinto_optimized(self):
import _io
a = bytearray('x' * 1024)
- f = _io.FileIO(self.create_bigfile(), 'r+')
+ f = _io.FileIO(self.bigfile, 'r+')
assert f.readinto(a) == 1000
assert a == 'a' * 1000 + 'x' * 24
More information about the pypy-commit
mailing list