- fix issue181: --pdb now also works on collect errors. This was

implemented by a slight internal refactoring and the introduction
  of a new hook ``pytest_exception_interact`` hook.

- fix issue341: introduce new experimental hook for IDEs/terminals to
  intercept debugging: ``pytest_exception_interact(node, call, report)``.
This commit is contained in:
holger krekel
2013-09-06 11:56:04 +02:00
parent 8360c1e687
commit 94ee37cdb3
12 changed files with 107 additions and 34 deletions

View File

@@ -1,5 +1,5 @@
import pytest, py, sys, os
from _pytest import runner
from _pytest import runner, main
from py._code.code import ReprExceptionInfo
class TestSetupState:
@@ -298,7 +298,7 @@ class TestSessionReports:
class TestClass:
pass
""")
rep = runner.pytest_make_collect_report(col)
rep = runner.collect_one_node(col)
assert not rep.failed
assert not rep.skipped
assert rep.passed
@@ -318,7 +318,7 @@ class TestSessionReports:
def test_func():
pass
""")
rep = runner.pytest_make_collect_report(col)
rep = main.collect_one_node(col)
assert not rep.failed
assert not rep.passed
assert rep.skipped