* 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:
@@ -577,11 +577,11 @@ raise ValueError()
|
||||
x = 1
|
||||
assert x == 2
|
||||
""")
|
||||
py.magic.invoke(assertion=True)
|
||||
py.code.patch_builtins(assertion=True)
|
||||
try:
|
||||
excinfo = py.test.raises(AssertionError, mod.somefunc)
|
||||
finally:
|
||||
py.magic.revoke(assertion=True)
|
||||
py.code.unpatch_builtins(assertion=True)
|
||||
|
||||
p = FormattedExcinfo()
|
||||
reprentry = p.repr_traceback_entry(excinfo.traceback[-1], excinfo)
|
||||
|
||||
Reference in New Issue
Block a user