Skip to content

Commit

Permalink
fix newline issue in test on pypy 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Jan 4, 2020
1 parent 7033097 commit 0978789
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_debug.py
Expand Up @@ -363,9 +363,9 @@ def test_console_closure_variables(monkeypatch):
c = console.Console()
c.eval("y = 5")
c.eval("x = lambda: y")
ret = c.eval("x()")
expected = ">>> x()\n5" if PY2 else ">>> x()\n5\n"
assert ret == expected
# strip() is only needed for Python 2 compat
ret = c.eval("x()").strip()
assert ret == ">>> x()\n5"


@pytest.mark.skipif(PY2, reason="Python 2 doesn't have chained exceptions.")
Expand Down

0 comments on commit 0978789

Please sign in to comment.