[pypy-svn] pypy default: MixedModule tests make no sense with appdirect.

amauryfa commits-noreply at bitbucket.org
Fri Mar 25 22:57:08 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: 
Changeset: r42948:f434ee4f2674
Date: 2011-03-25 22:56 +0100
http://bitbucket.org/pypy/pypy/changeset/f434ee4f2674/

Log:	MixedModule tests make no sense with appdirect.

diff --git a/pypy/interpreter/test/test_extmodules.py b/pypy/interpreter/test/test_extmodules.py
--- a/pypy/interpreter/test/test_extmodules.py
+++ b/pypy/interpreter/test/test_extmodules.py
@@ -1,4 +1,5 @@
 import sys
+import pytest
 
 from pypy.config.pypyoption import get_pypy_config
 from pypy.objspace.std import StdObjSpace
@@ -60,6 +61,7 @@
     def teardown_class(cls):
         sys.path[:] = old_sys_path
 
+    @pytest.mark.skipif("config.option.runappdirect")
     def test_import(self):
         import extmod
         assert extmod.__file__.endswith('extmod')

diff --git a/pypy/interpreter/gateway.py b/pypy/interpreter/gateway.py
--- a/pypy/interpreter/gateway.py
+++ b/pypy/interpreter/gateway.py
@@ -1126,7 +1126,7 @@
     """
     if not isinstance(source, str):
         source = py.std.inspect.getsource(source).lstrip()
-        while source.startswith('@py.test.mark.'):
+        while source.startswith(('@py.test.mark.', '@pytest.mark.')):
             # these decorators are known to return the same function
             # object, we may ignore them
             assert '\n' in source


More information about the Pypy-commit mailing list