Skip to content
Merged
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
41 changes: 22 additions & 19 deletions testing/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def test_1():
child = testdir.spawn_pytest("--pdb %s" % p1)
child.expect(".*def test_1")
child.expect(".*i = 0")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendeof()
rest = child.read().decode("utf8")
assert "1 failed" in rest
Expand All @@ -174,7 +174,7 @@ def test_false(self):
"""
)
child = testdir.spawn_pytest("--pdb %s" % p1)
child.expect("(Pdb)")
child.expect("Pdb")
child.sendline("p self.filename")
child.sendeof()
rest = child.read().decode("utf8")
Expand Down Expand Up @@ -209,7 +209,7 @@ def test_1():
child = testdir.spawn_pytest("--pdb %s" % p1)
child.expect("captured stdout")
child.expect("get rekt")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendeof()
rest = child.read().decode("utf8")
assert "1 failed" in rest
Expand All @@ -228,7 +228,7 @@ def test_1():
child = testdir.spawn_pytest("--pdb %s" % p1)
child.expect("captured stderr")
child.expect("get rekt")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendeof()
rest = child.read().decode("utf8")
assert "1 failed" in rest
Expand All @@ -243,7 +243,7 @@ def test_1():
"""
)
child = testdir.spawn_pytest("--pdb %s" % p1)
child.expect("(Pdb)")
child.expect("Pdb")
output = child.before.decode("utf8")
child.sendeof()
assert "captured stdout" not in output
Expand All @@ -266,7 +266,7 @@ def test_1():
if showcapture in ("all", "log"):
child.expect("captured log")
child.expect("get rekt")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendeof()
rest = child.read().decode("utf8")
assert "1 failed" in rest
Expand All @@ -287,7 +287,7 @@ def test_1():
child.expect("get rekt")
output = child.before.decode("utf8")
assert "captured log" not in output
child.expect("(Pdb)")
child.expect("Pdb")
child.sendeof()
rest = child.read().decode("utf8")
assert "1 failed" in rest
Expand All @@ -306,7 +306,7 @@ def test_1():
child = testdir.spawn_pytest("--pdb %s" % p1)
child.expect(".*def test_1")
child.expect(".*pytest.raises.*globalfunc")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendline("globalfunc")
child.expect(".*function")
child.sendeof()
Expand All @@ -322,7 +322,7 @@ def test_pdb_interaction_on_collection_issue181(self, testdir):
)
child = testdir.spawn_pytest("--pdb %s" % p1)
# child.expect(".*import pytest.*")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendeof()
child.expect("1 error")
self.flush(child)
Expand All @@ -337,7 +337,7 @@ def pytest_runtest_protocol():
p1 = testdir.makepyfile("def test_func(): pass")
child = testdir.spawn_pytest("--pdb %s" % p1)
# child.expect(".*import pytest.*")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendeof()
self.flush(child)

Expand All @@ -355,7 +355,7 @@ def test_1():
child = testdir.spawn_pytest(str(p1))
child.expect("test_1")
child.expect("x = 3")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendeof()
rest = child.read().decode("utf-8")
assert "1 failed" in rest
Expand All @@ -373,7 +373,7 @@ def test_1():
)
child = testdir.spawn_pytest(str(p1))
child.expect("test_1")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendeof()
rest = child.read().decode("utf8")
assert "1 failed" in rest
Expand Down Expand Up @@ -448,10 +448,10 @@ def function_1():
"""
)
child = testdir.spawn_pytest("--doctest-modules --pdb %s" % p1)
child.expect("(Pdb)")
child.expect("Pdb")
child.sendline("i")
child.expect("0")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendeof()
rest = child.read().decode("utf8")
assert "1 failed" in rest
Expand All @@ -474,9 +474,10 @@ def test_1():
child = testdir.spawn_pytest(str(p1))
child.expect("test_1")
child.expect("x = 3")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendline("c")
child.expect("x = 4")
child.expect("Pdb")
child.sendeof()
rest = child.read().decode("utf8")
assert "1 failed" in rest
Expand All @@ -495,6 +496,7 @@ def test_pdb_used_outside_test(self, testdir):
)
child = testdir.spawn("{} {}".format(sys.executable, p1))
child.expect("x = 5")
child.expect("Pdb")
child.sendeof()
self.flush(child)

Expand All @@ -511,6 +513,7 @@ def test_foo(a):
)
child = testdir.spawn_pytest(str(p1))
child.expect("x = 5")
child.expect("Pdb")
child.sendeof()
self.flush(child)

Expand Down Expand Up @@ -690,7 +693,7 @@ def test_1():
)
child = testdir.spawn_pytest(str(p1))
child.expect("test_1")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendeof()
rest = child.read().decode("utf8")
assert "1 failed" in rest
Expand All @@ -710,7 +713,7 @@ def test_1():
)
child = testdir.spawn_pytest(str(p1))
child.expect("test_1")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendeof()
rest = child.read().decode("utf8")
assert "1 failed" in rest
Expand All @@ -728,7 +731,7 @@ def test_1():
)
child = testdir.spawn_pytest("--trace " + str(p1))
child.expect("test_1")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendeof()
rest = child.read().decode("utf8")
assert "1 passed" in rest
Expand All @@ -747,7 +750,7 @@ def test_1():
)
child = testdir.spawn_pytest("--trace " + str(p1))
child.expect("is_equal")
child.expect("(Pdb)")
child.expect("Pdb")
child.sendeof()
rest = child.read().decode("utf8")
assert "1 passed" in rest
Expand Down