Skip to content

Commit 9d7c49a

Browse files
committed
Test load_ipython_extension
1 parent d2958f5 commit 9d7c49a

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

src/ipython_jl/tests/conftest.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pytest
22

33
from .. import core
4+
from .. import ipyext
45

56

67
@pytest.fixture
@@ -16,3 +17,12 @@ def Main():
1617
def julia(Main):
1718
""" pytest fixture for providing a `JuliaAPI` instance. """
1819
return core.get_api(Main)
20+
21+
22+
@pytest.fixture(scope="session")
23+
def ipy_with_magic():
24+
Main() # check if Julia API is ready
25+
from IPython.testing.globalipapp import get_ipython
26+
ip = get_ipython()
27+
ipyext.load_ipython_extension(ip)
28+
return ip

src/ipython_jl/tests/test_ipyext.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,7 @@ def test_uncompletable_events(julia, event):
5656
assert isinstance(completions, list)
5757
check_version(julia)
5858
assert not completions
59+
60+
61+
def test_inputhook_registration(ipy_with_magic):
62+
assert ipy_with_magic.active_eventloop == "julia"

0 commit comments

Comments
 (0)