File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -1027,19 +1027,25 @@ def test_trace_after_runpytest(testdir):
10271027 from _pytest.debugging import pytestPDB
10281028
10291029 def test_outer(testdir):
1030- from _pytest.debugging import pytestPDB
1031-
10321030 assert len(pytestPDB._saved) == 1
10331031
1034- testdir.runpytest("-k test_inner")
1032+ testdir.makepyfile(
1033+ \" ""
1034+ from _pytest.debugging import pytestPDB
10351035
1036- __import__('pdb').set_trace()
1036+ def test_inner():
1037+ assert len(pytestPDB._saved) == 2
1038+ print("test_inner_" + "end")
1039+ \" ""
1040+ )
10371041
1038- def test_inner(testdir):
1039- assert len(pytestPDB._saved) == 2
1042+ result = testdir.runpytest("-s", "-k", "test_inner")
1043+ assert result.ret == 0
1044+ __import__('pdb').set_trace()
10401045 """
10411046 )
1042- child = testdir .spawn_pytest ("-p pytester %s -k test_outer" % p1 )
1047+ child = testdir .spawn_pytest ("-s -p pytester %s -k test_outer" % p1 )
1048+ child .expect ("test_inner_end" )
10431049 child .expect (r"\(Pdb" )
10441050 child .sendline ("c" )
10451051 rest = child .read ().decode ("utf8" )
You can’t perform that action at this time.
0 commit comments