Skip to content

Commit

Permalink
tests: expand expected_nl check (coverage)
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Apr 30, 2021
1 parent 3922c05 commit 3df4e70
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions testing/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -4312,12 +4312,13 @@ def test_python_m_pdb_uses_pdbpp_and_env(PDBPP_HIJACK_PDB, monkeypatch, tmpdir):
if PDBPP_HIJACK_PDB:
assert "(Pdb)" not in out
assert "(Pdb++)" in out
if sys.platform == "win32" and (
sys.version_info < (3,) or sys.version_info >= (3, 5)
):
assert out.endswith("\n(Pdb++) " + os.linesep)
else:
assert out.endswith("\n(Pdb++) \n")
expected_nl = "\n"
if sys.platform == "win32":
if sys.version_info < (3,):
expected_nl = os.linesep
elif sys.version_info >= (3, 5):
expected_nl = os.linesep
assert out.endswith("\n(Pdb++) " + expected_nl)
else:
assert "(Pdb)" in out
assert "(Pdb++)" not in out
Expand Down

0 comments on commit 3df4e70

Please sign in to comment.