* introduce and document new pytest_namespace hook

* remove py.test.mark helper
* move xfail to work directly on py.test namespace, simplified

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-06-18 17:19:12 +02:00
parent bcb30d1c7a
commit 4a48a50e3b
16 changed files with 125 additions and 118 deletions

View File

@@ -83,34 +83,3 @@ def test_pytest_exit():
excinfo = py.code.ExceptionInfo()
assert excinfo.errisinstance(KeyboardInterrupt)
def test_pytest_mark_getattr():
from py.__.test.outcome import mark
def f(): pass
mark.hello(f)
assert f.hello == True
mark.hello("test")(f)
assert f.hello == "test"
py.test.raises(AttributeError, "mark._hello")
py.test.raises(AttributeError, "mark.__str__")
def test_pytest_mark_call():
from py.__.test.outcome import mark
def f(): pass
mark(x=3)(f)
assert f.x == 3
def g(): pass
mark(g)
assert not g.func_dict
mark.hello(f)
assert f.hello == True
mark.hello("test")(f)
assert f.hello == "test"
mark("x1")(f)
assert f.mark == "x1"