Skip to content

Commit

Permalink
Fix expected text depending on IPython version. (#1354)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau authored Feb 24, 2025
1 parent b3a0999 commit 4854752
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_start_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@

@flaky(max_runs=3)
def test_ipython_start_kernel_userns():
import IPython

if IPython.version_info > (9, 0): # noqa:SIM108
EXPECTED = "IPythonMainModule"
else:
# not this since https://github.com/ipython/ipython/pull/14754
EXPECTED = "DummyMod"

cmd = dedent(
"""
from ipykernel.kernelapp import launch_new_instance
Expand All @@ -40,7 +48,7 @@ def test_ipython_start_kernel_userns():
content = msg["content"]
assert content["found"]
text = content["data"]["text/plain"]
assert "DummyMod" in text
assert EXPECTED in text


@flaky(max_runs=3)
Expand Down

0 comments on commit 4854752

Please sign in to comment.