[py-svn] r8309 - in py/dist/py/misc: . testing
hpk at codespeak.net
hpk at codespeak.net
Sun Jan 16 17:34:33 CET 2005
Author: hpk
Date: Sun Jan 16 17:34:33 2005
New Revision: 8309
Modified:
py/dist/py/misc/error.py
py/dist/py/misc/testing/test_initpkg.py
Log:
let import-all generate tests for each import ...
Modified: py/dist/py/misc/error.py
==============================================================================
--- py/dist/py/misc/error.py (original)
+++ py/dist/py/misc/error.py Sun Jan 16 17:34:33 2005
@@ -20,7 +20,7 @@
ModuleType = type(py)
class py_error(ModuleType):
- """ py.error contains higher level Exception classes
+ """ py.error lazily provides higher level Exception classes
for each possible POSIX errno (as defined per
the 'errno' module. All such Exceptions derive
from py.error.Error, which itself is a subclass
Modified: py/dist/py/misc/testing/test_initpkg.py
==============================================================================
--- py/dist/py/misc/testing/test_initpkg.py (original)
+++ py/dist/py/misc/testing/test_initpkg.py Sun Jan 16 17:34:33 2005
@@ -1,3 +1,5 @@
+from __future__ import generators
+
import py
import types
@@ -24,7 +26,7 @@
from py.path import local as local2
assert local1 is local2
-def test_importing_all_implementations():
+def test_importall():
base = py.path.local(py.__file__).dirpath()
nodirs = (
base.join('test', 'testing', 'test'),
@@ -45,7 +47,10 @@
else:
relpath = relpath.replace(base.sep, '.')
modpath = 'py.__impl__.%s' % relpath
- assert __import__(modpath)
+ yield check_import, modpath
+
+def check_import(modpath):
+ assert __import__(modpath)
def test_shahexdigest():
hex = py.__package__.shahexdigest()
More information about the pytest-commit
mailing list