[pypy-svn] r7335 - pypy/trunk/src/pypy/tool/pytest
hpk at codespeak.net
hpk at codespeak.net
Wed Nov 17 16:58:06 CET 2004
Author: hpk
Date: Wed Nov 17 16:58:06 2004
New Revision: 7335
Modified:
pypy/trunk/src/pypy/tool/pytest/ (props changed)
pypy/trunk/src/pypy/tool/pytest/support.py
Log:
ignore *.pyc
beginnings of testing the magic assertion at app level
Modified: pypy/trunk/src/pypy/tool/pytest/support.py
==============================================================================
--- pypy/trunk/src/pypy/tool/pytest/support.py (original)
+++ pypy/trunk/src/pypy/tool/pytest/support.py Wed Nov 17 16:58:06 2004
@@ -3,6 +3,7 @@
py.magic.autopath()
from pypy.objspace.std import StdObjSpace
from pypy.interpreter.gateway import app2interp, interp2app
+from pypy.interpreter.argument import Arguments
class AppRunnerFrame:
@@ -50,13 +51,24 @@
w_inspect_assertion)
return w_myassertion
-def test():
- space = StdObjSpace()
+def setup_module(mod):
+ mod.space = StdObjSpace()
+
+def test_AppRunnerFrame():
w_glob = space.newdict([])
w_loc = space.newdict([])
runner = AppRunnerFrame(space, w_glob, w_loc)
exprinfo.run("f = lambda x: x+1", runner)
exprinfo.check("isinstance(f(2), float)", runner)
+def test_myexception():
+ def app_test_func():
+ assert 42 == 43
+ t = app2interp(app_test_func)
+ f = t.get_function(space)
+ #space.setitem(space.w_builtins, space.wrap('AssertionError'),
+ # build_pytest_assertion(space))
+ f.call_args(Arguments([]))
+
if __name__ == '__main__':
test()
More information about the Pypy-commit
mailing list