[svn r63785] further renaming, streamlining the testing machinery and helpers.

--HG--
branch : trunk
This commit is contained in:
hpk
2009-04-07 12:48:57 +02:00
parent 5b31dfe357
commit a37c32783d
12 changed files with 86 additions and 99 deletions

View File

@@ -108,9 +108,8 @@ class TestDoctests:
>>> x == 1
False
""")
events = testdir.inline_run(p)
ev, = events.getnamed("itemtestreport")
assert ev.failed
sorter = testdir.inline_run(p)
sorter.assertoutcome(failed=1)
def test_doctest_unexpected_exception(self, testdir):
from py.__.test.outcome import Failed
@@ -123,11 +122,9 @@ class TestDoctests:
2
""")
sorter = testdir.inline_run(p)
events = sorter.getnamed("itemtestreport")
assert len(events) == 1
ev, = events
assert ev.failed
assert ev.longrepr
call = sorter.getcall("itemtestreport")
assert call.rep.failed
assert call.rep.longrepr
# XXX
#testitem, = items
#excinfo = py.test.raises(Failed, "testitem.runtest()")
@@ -144,9 +141,8 @@ class TestDoctests:
'''
""")
events = testdir.inline_run(p, "--doctest-modules")
ev, = events.getnamed("itemtestreport")
assert ev.failed
sorter = testdir.inline_run(p, "--doctest-modules")
sorter.assertoutcome(failed=1)
def test_txtfile_failing(self, testdir):
testdir.plugins.append('pytest_doctest')