[pypy-svn] r74298 - in pypy/branch/py12/pypy: jit/backend/cli/test jit/backend/llvm/test lib/app_test/ctypes_tests module/select rlib/rsdl/test rpython/numpy/test translator/benchmark
hpk at codespeak.net
hpk at codespeak.net
Fri Apr 30 20:20:51 CEST 2010
Author: hpk
Date: Fri Apr 30 20:20:45 2010
New Revision: 74298
Modified:
pypy/branch/py12/pypy/jit/backend/cli/test/conftest.py
pypy/branch/py12/pypy/jit/backend/llvm/test/conftest.py
pypy/branch/py12/pypy/lib/app_test/ctypes_tests/conftest.py
pypy/branch/py12/pypy/module/select/conftest.py
pypy/branch/py12/pypy/rlib/rsdl/test/conftest.py
pypy/branch/py12/pypy/rpython/numpy/test/conftest.py
pypy/branch/py12/pypy/translator/benchmark/conftest.py
Log:
simplify directory/conditional skipping and get
get rid of deprecations
Modified: pypy/branch/py12/pypy/jit/backend/cli/test/conftest.py
==============================================================================
--- pypy/branch/py12/pypy/jit/backend/cli/test/conftest.py (original)
+++ pypy/branch/py12/pypy/jit/backend/cli/test/conftest.py Fri Apr 30 20:20:45 2010
@@ -1,5 +1,4 @@
import py
-class Directory(py.test.collect.Directory):
- def collect(self):
- py.test.skip("CLI backend tests skipped for now")
+def pytest_collect_directory(path):
+ py.test.skip("CLI backend tests skipped for now")
Modified: pypy/branch/py12/pypy/jit/backend/llvm/test/conftest.py
==============================================================================
--- pypy/branch/py12/pypy/jit/backend/llvm/test/conftest.py (original)
+++ pypy/branch/py12/pypy/jit/backend/llvm/test/conftest.py Fri Apr 30 20:20:45 2010
@@ -1,5 +1,4 @@
import py
-class Directory(py.test.collect.Directory):
- def collect(self):
- py.test.skip("llvm backend tests skipped for now")
+def pytest_collect_directory():
+ py.test.skip("llvm backend tests skipped for now")
Modified: pypy/branch/py12/pypy/lib/app_test/ctypes_tests/conftest.py
==============================================================================
--- pypy/branch/py12/pypy/lib/app_test/ctypes_tests/conftest.py (original)
+++ pypy/branch/py12/pypy/lib/app_test/ctypes_tests/conftest.py Fri Apr 30 20:20:45 2010
@@ -1,11 +1,9 @@
import py
import sys
-class Directory(py.test.collect.Directory):
- def collect(self):
- if '__pypy__' not in sys.builtin_module_names:
- py.test.skip("these tests are meant to be run on top of pypy-c")
- return super(Directory, self).collect()
+def pytest_collect_directory():
+ if '__pypy__' not in sys.builtin_module_names:
+ py.test.skip("these tests are meant to be run on top of pypy-c")
def compile_so_file():
from pypy.translator.platform import platform
Modified: pypy/branch/py12/pypy/module/select/conftest.py
==============================================================================
--- pypy/branch/py12/pypy/module/select/conftest.py (original)
+++ pypy/branch/py12/pypy/module/select/conftest.py Fri Apr 30 20:20:45 2010
@@ -1,10 +1,4 @@
import py
-class Directory(py.test.collect.Directory):
-
- def run(self):
- try:
- import ctypes
- except ImportError:
- py.test.skip("these tests need ctypes installed")
- return super(Directory, self).run()
+def pytest_collect_directory():
+ py.test.importorskip("ctypes")
Modified: pypy/branch/py12/pypy/rlib/rsdl/test/conftest.py
==============================================================================
--- pypy/branch/py12/pypy/rlib/rsdl/test/conftest.py (original)
+++ pypy/branch/py12/pypy/rlib/rsdl/test/conftest.py Fri Apr 30 20:20:45 2010
@@ -1,10 +1,8 @@
from pypy.rlib.rsdl.eci import check_sdl_installation, SDLNotInstalled
import py
-class Directory(py.test.collect.Directory):
- def collect(self):
- try:
- check_sdl_installation()
- except SDLNotInstalled, e:
- py.test.skip("SDL not installed(?): %s" % (e,))
- return py.test.collect.Directory.collect(self)
+def pytest_collect_directory():
+ try:
+ check_sdl_installation()
+ except SDLNotInstalled, e:
+ py.test.skip("SDL not installed(?): %s" % (e,))
Modified: pypy/branch/py12/pypy/rpython/numpy/test/conftest.py
==============================================================================
--- pypy/branch/py12/pypy/rpython/numpy/test/conftest.py (original)
+++ pypy/branch/py12/pypy/rpython/numpy/test/conftest.py Fri Apr 30 20:20:45 2010
@@ -1,10 +1,4 @@
import py
-class Directory(py.test.collect.Directory):
-
- def run(self):
- try:
- import numpy
- except ImportError:
- py.test.skip("these tests need numpy installed")
- return super(Directory, self).run()
+def pytest_collect_directory():
+ py.test.importorskip("numpy")
Modified: pypy/branch/py12/pypy/translator/benchmark/conftest.py
==============================================================================
--- pypy/branch/py12/pypy/translator/benchmark/conftest.py (original)
+++ pypy/branch/py12/pypy/translator/benchmark/conftest.py Fri Apr 30 20:20:45 2010
@@ -1,7 +1,4 @@
import py
-class Directory(py.test.collect.Directory):
-
- def recfilter(self, path):
- # exclude the subdirectories added by 'svn co' from benchmarks.py
- return path.check(basename='test')
+def pytest_ignore_collect_path(path):
+ return path.basename == "test"
More information about the Pypy-commit
mailing list