Files
pytest2/py/doc/example/pytest/test_failures.py
hpk 7cf9824680 [svn r37278] move files from branch to trunk (and thus complete
the merge of the config branch into the trunk)

--HG--
branch : trunk
2007-01-24 17:46:46 +01:00

13 lines
380 B
Python

import py
failure_demo = py.magic.autopath().dirpath('failure_demo.py')
def test_failure_demo_fails_properly():
config = py.test.config._reparse([failure_demo])
session = config.initsession()
session.main()
l = session.getitemoutcomepairs(py.test.Item.Failed)
assert len(l) == 21
l = session.getitemoutcomepairs(py.test.Item.Passed)
assert not l