Add test for exposure of underlying exception
This commit is contained in:
parent
d0eb86cfa6
commit
35e6dd0117
|
@ -342,6 +342,15 @@ class TestPDB:
|
||||||
child.sendeof()
|
child.sendeof()
|
||||||
self.flush(child)
|
self.flush(child)
|
||||||
|
|
||||||
|
def test_pdb_prevent_ConftestImportFailure_hiding_exception(self, testdir):
|
||||||
|
testdir.makepyfile("def test_func(): pass")
|
||||||
|
sub_dir = testdir.tmpdir.join("ns").ensure_dir()
|
||||||
|
sub_dir.join("conftest").new(ext=".py").write("import unknown")
|
||||||
|
sub_dir.join("test_file").new(ext=".py").write("def test_func(): pass")
|
||||||
|
|
||||||
|
result = testdir.runpytest_subprocess("--pdb", ".")
|
||||||
|
result.stdout.fnmatch_lines(["-> import unknown"])
|
||||||
|
|
||||||
def test_pdb_interaction_capturing_simple(self, testdir):
|
def test_pdb_interaction_capturing_simple(self, testdir):
|
||||||
p1 = testdir.makepyfile(
|
p1 = testdir.makepyfile(
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue