refine reporting with --pdb some more
--HG-- branch : trunk
This commit is contained in:
parent
3f1efe1b57
commit
149f9e1042
|
@ -34,7 +34,8 @@ New features
|
||||||
Bug fixes / Maintenance
|
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 assertion interpretation with the ** operator
|
||||||
- fix issue105 assignment on the same line as a failing assertion
|
- fix issue105 assignment on the same line as a failing assertion
|
||||||
- fix issue104 proper escaping for test names in junitxml plugin
|
- fix issue104 proper escaping for test names in junitxml plugin
|
||||||
|
|
|
@ -15,6 +15,9 @@ def pytest_configure(config):
|
||||||
config.pluginmanager.register(PdbInvoke(), 'pdb')
|
config.pluginmanager.register(PdbInvoke(), 'pdb')
|
||||||
|
|
||||||
class PdbInvoke:
|
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__):
|
def pytest_runtest_makereport(self, item, call, __multicall__):
|
||||||
if not call.excinfo or \
|
if not call.excinfo or \
|
||||||
call.excinfo.errisinstance(py.test.skip.Exception):
|
call.excinfo.errisinstance(py.test.skip.Exception):
|
||||||
|
|
|
@ -50,7 +50,9 @@ class TestPDB:
|
||||||
child.expect(".*i = 0")
|
child.expect(".*i = 0")
|
||||||
child.expect("(Pdb)")
|
child.expect("(Pdb)")
|
||||||
child.sendeof()
|
child.sendeof()
|
||||||
child.expect("1 failed")
|
rest = child.read()
|
||||||
|
assert "1 failed" in rest
|
||||||
|
assert "def test_1" not in rest
|
||||||
if child.isalive():
|
if child.isalive():
|
||||||
child.wait()
|
child.wait()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue