* 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:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user