File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -879,3 +879,22 @@ def test_2():
879
879
rest = child .read ().decode ("utf8" )
880
880
assert "no tests ran" in rest
881
881
TestPDB .flush (child )
882
+
883
+
884
+ def test_capture_with_testdir_parseconfig (testdir ):
885
+ """Test capturing with inner node of config setup. Also tests #4330."""
886
+ p = testdir .makepyfile (
887
+ """
888
+ def test_inner(testdir):
889
+ hello = testdir.makefile(".py", hello="world")
890
+ __import__('pdb').set_trace()
891
+ node = testdir.parseconfig(hello)
892
+ """
893
+ )
894
+ child = testdir .spawn_pytest ("-s -p pytester %s" % p )
895
+ child .expect (r"\(Pdb" )
896
+ child .sendline ("n" )
897
+ child .sendline ("c" )
898
+ rest = child .read ().decode ("utf8" )
899
+ TestPDB .flush (child )
900
+ assert child .exitstatus == 0 , rest
You can’t perform that action at this time.
0 commit comments