Ronny Pfannschmidt avatar Ronny Pfannschmidt committed 3bcc574

kill tool/pytest/modcheck for pytest.importorskip

Comments (0)

Files changed (2)


 import sys, os
-from pypy.tool.pytest.modcheck import skipimporterror
 from pypy.rpython.lltypesystem.module.ll_os_path import Implementation as impl
 from import ll_strcpy
 from pypy.rpython.test.test_llinterp import interpret
 from pypy.tool.udir import udir
+def setup_module(mod):
+    py.test.importorskip('ctypes')
 def test_exists():
     filename = impl.to_rstr(str(py.path.local(__file__)))
     assert impl.ll_os_path_exists(filename) == True


-import py
-def skipimporterror(name):
-    if not hasimport(name):
-        __tracebackhide__ = True
-        py.test.skip("cannot import %r module" % (name,))
-def hasimport(name):
-    try:
-        __import__(name)
-    except ImportError:
-        return False
-    else:
-        return True
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.