Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions testing/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,3 +879,22 @@ def test_2():
rest = child.read().decode("utf8")
assert "no tests ran" in rest
TestPDB.flush(child)


def test_capture_with_testdir_parseconfig(testdir):
"""Test capturing with inner node of config setup. Also tests #4330."""
p = testdir.makepyfile(
"""
def test_inner(testdir):
hello = testdir.makefile(".py", hello="world")
__import__('pdb').set_trace()
node = testdir.parseconfig(hello)
"""
)
child = testdir.spawn_pytest("-s -p pytester %s" % p)
child.expect(r"\(Pdb")
child.sendline("n")
child.sendline("c")
rest = child.read().decode("utf8")
TestPDB.flush(child)
assert child.exitstatus == 0, rest