* deprecate py.magic.invoke/revoke in favour of

the new py.code.patch_builtins, py.code.unpatch_builtins

* deprecate py.magic.patch/revert

* deprecate py.magic.AssertionError in favour of py.code._AssertionError

* introduced pytest_assertion plugin.

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-08-27 17:26:02 +02:00
parent e391662cff
commit 13932b7f4b
26 changed files with 564 additions and 696 deletions

View File

@@ -174,3 +174,14 @@ def test_autoimport():
from py.initpkg import autoimport
py.std.os.environ['AUTOTEST_AUTOIMPORT'] = "nonexistmodule"
py.test.raises(ImportError, "autoimport('autotest')")
def test_all_resolves():
seen = py.builtin.set([py])
lastlength = None
while len(seen) != lastlength:
lastlength = len(seen)
for item in py.builtin.frozenset(seen):
for value in item.__dict__.values():
if isinstance(value, type(py.test)):
seen.add(value)