- 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,4 +1,5 @@
import pytest, py, sys
from _pytest import runner
class TestOEJSKITSpecials:
def test_funcarg_non_pycollectobj(self, testdir): # rough jstests usage
@@ -18,7 +19,7 @@ class TestOEJSKITSpecials:
pass
""")
# this hook finds funcarg factories
rep = modcol.ihook.pytest_make_collect_report(collector=modcol)
rep = runner.collect_one_node(collector=modcol)
clscol = rep.result[0]
clscol.obj = lambda arg1: None
clscol.funcargs = {}
@@ -46,7 +47,7 @@ class TestOEJSKITSpecials:
pass
""")
# this hook finds funcarg factories
rep = modcol.ihook.pytest_make_collect_report(collector=modcol)
rep = runner.collect_one_node(modcol)
clscol = rep.result[0]
clscol.obj = lambda: None
clscol.funcargs = {}