[pypy-svn] r30672 - pypy/dist/pypy/rpython/module/test
arigo at codespeak.net
arigo at codespeak.net
Fri Jul 28 11:31:10 CEST 2006
Author: arigo
Date: Fri Jul 28 11:31:09 2006
New Revision: 30672
Modified:
pypy/dist/pypy/rpython/module/test/test_posix.py
Log:
The test file is modified by some tests, which makes other tests then fail.
Let's restore the content of the test file before each test runs.
Modified: pypy/dist/pypy/rpython/module/test/test_posix.py
==============================================================================
--- pypy/dist/pypy/rpython/module/test/test_posix.py (original)
+++ pypy/dist/pypy/rpython/module/test/test_posix.py Fri Jul 28 11:31:09 2006
@@ -5,13 +5,16 @@
def setup_module(module):
testf = udir.join('test.txt')
- testfile = testf.open('w')
- testfile.write('This is a test')
- testfile.close()
module.path = testf.strpath
class BaseTestPosix(BaseRtypingTest):
+ def setup_method(self, meth):
+ # prepare/restore the file before each test
+ testfile = open(path, 'wb')
+ testfile.write('This is a test')
+ testfile.close()
+
def test_open(self):
def f():
ff = posix.open(path,posix.O_RDONLY,0777)
More information about the Pypy-commit
mailing list