[pypy-svn] r79510 - in pypy/trunk/pypy/interpreter: . test
afa at codespeak.net
afa at codespeak.net
Thu Nov 25 13:48:03 CET 2010
Author: afa
Date: Thu Nov 25 13:48:02 2010
New Revision: 79510
Modified:
pypy/trunk/pypy/interpreter/gateway.py
pypy/trunk/pypy/interpreter/test/test_gateway.py
Log:
Check that @py.test.mark.* can really be used with applevel tests.
Previously only @py.test.mark.xfail used to work, because the transformation always failed :-/
Modified: pypy/trunk/pypy/interpreter/gateway.py
==============================================================================
--- pypy/trunk/pypy/interpreter/gateway.py (original)
+++ pypy/trunk/pypy/interpreter/gateway.py Thu Nov 25 13:48:02 2010
@@ -1083,7 +1083,7 @@
# these decorators are known to return the same function
# object, we may ignore them
assert '\n' in source
- source = source[source.find('\n') + 1:]
+ source = source[source.find('\n') + 1:].lstrip()
assert source.startswith("def "), "can only transform functions"
source = source[4:]
p = source.find('(')
Modified: pypy/trunk/pypy/interpreter/test/test_gateway.py
==============================================================================
--- pypy/trunk/pypy/interpreter/test/test_gateway.py (original)
+++ pypy/trunk/pypy/interpreter/test/test_gateway.py Thu Nov 25 13:48:02 2010
@@ -578,6 +578,11 @@
w_res = space.call_args(w_g, args)
assert space.eq_w(w_res, space.wrap((-1, 0)))
+class AppTestPyTestMark:
+ @py.test.mark.unlikely_to_exist
+ def test_anything(self):
+ pass
+
class TestPassThroughArguments:
More information about the Pypy-commit
mailing list