[pypy-svn] r59619 - pypy/build/testrunner/test
pedronis at codespeak.net
pedronis at codespeak.net
Sat Nov 1 13:25:25 CET 2008
Author: pedronis
Date: Sat Nov 1 13:25:25 2008
New Revision: 59619
Modified:
pypy/build/testrunner/test/test_runner.py
Log:
simple test for run helper
Modified: pypy/build/testrunner/test/test_runner.py
==============================================================================
--- pypy/build/testrunner/test/test_runner.py (original)
+++ pypy/build/testrunner/test/test_runner.py Sat Nov 1 13:25:25 2008
@@ -1,8 +1,24 @@
-import py, sys, os, signal, cStringIO
+import py, sys, os, signal, cStringIO, tempfile
import runner
+class TestRunHelper(object):
+
+ def setup_method(self, meth):
+ h, self.fn = tempfile.mkstemp()
+ os.close(h)
+
+ def teardown_method(self, meth):
+ os.unlink(self.fn)
+
+ def test_run(self):
+ res = runner.run([sys.executable, "-c", "print 42"], '.', py.path.local(self.fn))
+ assert res == 0
+ out = py.path.local(self.fn).read('r')
+ assert out == "42\n"
+
+
class TestExecuteTest(object):
def setup_class(cls):
More information about the Pypy-commit
mailing list