File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,29 @@ def test_func():
147147 assert rep .failed
148148 assert len (pdblist ) == 1
149149
150+ # TEMP/DEBUG
151+ def test_pdb_interaction (self , testdir ):
152+ p1 = testdir .makepyfile (
153+ """
154+ def test_1():
155+ i = 0
156+ assert i == 1
157+
158+ def test_not_called_due_to_quit():
159+ pass
160+ """
161+ )
162+ child = testdir .spawn_pytest ("--pdb %s" % p1 )
163+ child .expect (".*def test_1" )
164+ child .expect (".*i = 0" )
165+ child .expect ("Pdb" )
166+ child .sendeof ()
167+ rest = child .read ().decode ("utf8" )
168+ assert "= 1 failed in" in rest
169+ assert "def test_1" not in rest
170+ assert "Exit: Quitting debugger" in rest
171+ self .flush (child )
172+
150173 @staticmethod
151174 def flush (child ):
152175 if platform .system () == "Darwin" :
You can’t perform that action at this time.
0 commit comments