refine reporting with --pdb some more

--HG--
branch : trunk
This commit is contained in:
holger krekel 2010-06-17 12:53:29 +02:00
parent 3f1efe1b57
commit 149f9e1042
3 changed files with 8 additions and 2 deletions

View File

@ -34,7 +34,8 @@ New features
Bug fixes / Maintenance
++++++++++++++++++++++++++
- fix --pdb to ignore xfailed tests and unify its TB-reporting
- refine --pdb: ignore xfailed tests, unify its TB-reporting and
don't display failures again at the end.
- fix assertion interpretation with the ** operator
- fix issue105 assignment on the same line as a failing assertion
- fix issue104 proper escaping for test names in junitxml plugin

View File

@ -15,6 +15,9 @@ def pytest_configure(config):
config.pluginmanager.register(PdbInvoke(), 'pdb')
class PdbInvoke:
def pytest_sessionfinish(self, session):
# don't display failures again at the end
session.config.option.tbstyle = "no"
def pytest_runtest_makereport(self, item, call, __multicall__):
if not call.excinfo or \
call.excinfo.errisinstance(py.test.skip.Exception):

View File

@ -50,7 +50,9 @@ class TestPDB:
child.expect(".*i = 0")
child.expect("(Pdb)")
child.sendeof()
child.expect("1 failed")
rest = child.read()
assert "1 failed" in rest
assert "def test_1" not in rest
if child.isalive():
child.wait()