[pypy-svn] r7989 - in pypy/branch/src-pytest/pypy: . interpreter/test

hpk at codespeak.net hpk at codespeak.net
Fri Dec 24 19:51:58 CET 2004


Author: hpk
Date: Fri Dec 24 19:51:56 2004
New Revision: 7989

Added:
   pypy/branch/src-pytest/pypy/example_pytest.py
Modified:
   pypy/branch/src-pytest/pypy/conftest.py
   pypy/branch/src-pytest/pypy/interpreter/test/test_interpreter.py
Log:
small fix, an example_pytest containing the 
four so-far test variants and a fully converted 
test_interpreter.py 



Modified: pypy/branch/src-pytest/pypy/conftest.py
==============================================================================
--- pypy/branch/src-pytest/pypy/conftest.py	(original)
+++ pypy/branch/src-pytest/pypy/conftest.py	Fri Dec 24 19:51:56 2004
@@ -97,7 +97,7 @@
         name = target.func_globals.get('objspacename', None) 
         space = gettestobjspace(name) 
         func = app2interp_temp(target, target.__name__)
-        self.execute_in_space(space, target, space)
+        self.execute_in_space(space, target)
 
 class IntTestMethod(PyPyItem): 
     def execute(self, target, *args):

Added: pypy/branch/src-pytest/pypy/example_pytest.py
==============================================================================
--- (empty file)
+++ pypy/branch/src-pytest/pypy/example_pytest.py	Fri Dec 24 19:51:56 2004
@@ -0,0 +1,14 @@
+class AppTestTest: 
+    def test_app_method(self):
+        assert 42 == 41 
+
+def app_test_app_func(): 
+    assert 41 == 42 
+
+def test_interp_func(space): 
+    assert space.is_true(space.w_None) 
+
+class TestInterpTest: 
+    def test_interp_method(self): 
+        assert self.space.is_true(self.space.w_False) 
+

Modified: pypy/branch/src-pytest/pypy/interpreter/test/test_interpreter.py
==============================================================================
--- pypy/branch/src-pytest/pypy/interpreter/test/test_interpreter.py	(original)
+++ pypy/branch/src-pytest/pypy/interpreter/test/test_interpreter.py	Fri Dec 24 19:51:56 2004
@@ -255,6 +255,3 @@
         finally:
             sys.stdout = save
 
-    def test_identity(self):
-        def f(x): return x
-        assert f(666) == 666



More information about the Pypy-commit mailing list