From 952bbefaac3836e4c4a8ae6e0919dabcb90a448a Mon Sep 17 00:00:00 2001 From: Jeffrey Rackauckas Date: Sat, 30 Jun 2018 18:26:58 -0700 Subject: [PATCH] Add initial test. --- testing/test_pdb.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/testing/test_pdb.py b/testing/test_pdb.py index 08be812a2..7bb19d20f 100644 --- a/testing/test_pdb.py +++ b/testing/test_pdb.py @@ -696,3 +696,20 @@ class TestDebuggingBreakpoints(object): assert "1 failed" in rest assert "reading from stdin while output" not in rest TestPDB.flush(child) + +class TestTraceOption(): + def test_trace_sets_breakpoint(self, testdir): + p1 = testdir.makepyfile( + """ + def test_1(): + assert 1 + """ + ) + child = testdir.spawn_pytest("--trace " + str(p1)) + child.expect("test_1") + child.expect("(Pdb)") + child.sendeof() + rest = child.read().decode("utf8") + assert "1 failed" in rest + assert "reading from stdin while output" not in rest + TestPDB.flush(child) \ No newline at end of file