[pypy-svn] r15411 - pypy/dist/pypy/module/posix/test
hpk at codespeak.net
hpk at codespeak.net
Sat Jul 30 13:42:27 CEST 2005
Author: hpk
Date: Sat Jul 30 13:42:27 2005
New Revision: 15411
Modified:
pypy/dist/pypy/module/posix/test/test_posix2.py
Log:
refactor the test after the new interp/app test interactions
possibility
Modified: pypy/dist/pypy/module/posix/test/test_posix2.py
==============================================================================
--- pypy/dist/pypy/module/posix/test/test_posix2.py (original)
+++ pypy/dist/pypy/module/posix/test/test_posix2.py Sat Jul 30 13:42:27 2005
@@ -9,15 +9,15 @@
class AppTestPosix:
def setup_class(cls):
cls.space = space
+ cls.w_posix = space.appexec([], "(): import posix ; return posix")
+ cls.w_path = space.wrap(str(path))
def test_posix_is_pypy_s(self):
- import posix
- assert posix.__file__
+ assert self.posix.__file__
-def test_some_posix_basic_operation():
- w_path = space.wrap(str(path))
- space.appexec([w_path], """(path):
- import posix
+ def test_some_posix_basic_operation(self):
+ path = self.path
+ posix = self.posix
fd = posix.open(path, posix.O_RDONLY, 0777)
fd2 = posix.dup(fd)
assert not posix.isatty(fd2)
@@ -30,4 +30,3 @@
assert stat # XXX
posix.close(fd2)
posix.close(fd)
- """)
More information about the Pypy-commit
mailing list