Author: Ronan Lamy <ronan.l...@gmail.com> Branch: py3tests Changeset: r95354:c2e1ab58d77d Date: 2018-11-20 20:46 +0000 http://bitbucket.org/pypy/pypy/changeset/c2e1ab58d77d/
Log: hg merge apptest-file diff --git a/pypy/module/_cffi_backend/test/test_c.py b/pypy/module/_cffi_backend/test/test_c.py --- a/pypy/module/_cffi_backend/test/test_c.py +++ b/pypy/module/_cffi_backend/test/test_c.py @@ -25,6 +25,8 @@ from rpython.translator.platform import host from rpython.translator.tool.cbuild import ExternalCompilationInfo +from .. import VERSION as TEST_VERSION + class AppTestC(object): """Populated below, hack hack hack.""" @@ -32,6 +34,15 @@ spaceconfig = dict(usemodules=('_cffi_backend', '_io', 'array')) def setup_class(cls): + if cls.runappdirect: + _cffi_backend = py.test.importorskip('_cffi_backend') + if _cffi_backend.__version__ != TEST_VERSION: + py.test.skip( + "These tests are for cffi version %s, this Python " + "has version %s installed" % + (TEST_VERSION, _cffi_backend.__version__)) + + testfuncs_w = [] keepalive_funcs = [] UniqueCache.for_testing = True diff --git a/pypy/module/_continuation/test/conftest.py b/pypy/module/_continuation/test/conftest.py --- a/pypy/module/_continuation/test/conftest.py +++ b/pypy/module/_continuation/test/conftest.py @@ -1,7 +1,7 @@ -import pytest import sys def pytest_configure(config): - if sys.platform.startswith('linux'): + if (not config.getoption('runappdirect') and + sys.platform.startswith('linux')): from rpython.rlib.rvmprof.cintf import configure_libbacktrace_linux configure_libbacktrace_linux() diff --git a/pypy/module/_cppyy/test/conftest.py b/pypy/module/_cppyy/test/conftest.py --- a/pypy/module/_cppyy/test/conftest.py +++ b/pypy/module/_cppyy/test/conftest.py @@ -41,6 +41,8 @@ disabled = None def pytest_configure(config): + if config.getoption('runappdirect'): + return if py.path.local.sysfind('genreflex') is None: import pypy.module._cppyy.capi.loadable_capi as lcapi try: diff --git a/pypy/module/cpyext/test/conftest.py b/pypy/module/cpyext/test/conftest.py --- a/pypy/module/cpyext/test/conftest.py +++ b/pypy/module/cpyext/test/conftest.py @@ -16,10 +16,9 @@ space = gettestobjspace(usemodules=['time']) space.getbuiltinmodule("time") -def pytest_ignore_collect(path, config): # ensure additional functions are registered import pypy.module.cpyext.test.test_cpyext - return False + def pytest_funcarg__api(request): return request.cls.api diff --git a/pypy/module/pypyjit/test/conftest.py b/pypy/module/pypyjit/test/conftest.py deleted file mode 100644 --- a/pypy/module/pypyjit/test/conftest.py +++ /dev/null @@ -1,7 +0,0 @@ -def pytest_addoption(parser): - group = parser.getgroup("pypyjit options") - group.addoption("--pypy", action="store", default=None, dest="pypy_c", - help="DEPRECATED: use this in test_pypy_c instead") -# XXX kill the corresponding section in the buildbot run, -# which (as far as I can tell) ignores that option entirely and does -# the same as the regular py.test. _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit