Skip to content

Commit 40841dc

Browse files
committed
avoid imports of internal core.display
less sensitive to implementation details, use public imports
1 parent e3530b9 commit 40841dc

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

ipyparallel/tests/clienttest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def generate_output():
5555
a rich displayable object.
5656
"""
5757

58-
from IPython.core.display import HTML, Math, display
58+
from IPython.display import HTML, Math, display
5959

6060
print("stdout")
6161
print("stderr", file=sys.stderr)

ipyparallel/tests/test_magics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,18 @@ def test_cellpx_groupby_order(self):
173173
expected.extend(
174174
[
175175
r'\[output:\d+\]',
176-
'IPython.core.display.HTML',
176+
'IPython..+.HTML',
177177
]
178178
* len(v)
179179
)
180180
expected.extend(
181181
[
182182
r'\[output:\d+\]',
183-
'IPython.core.display.Math',
183+
'IPython..+.Math',
184184
]
185185
* len(v)
186186
)
187-
expected.extend([r'Out\[\d+:\d+\]:.*IPython\.core\.display\.Math'] * len(v))
187+
expected.extend([r'Out\[\d+:\d+\]:.*IPython\..+\.Math'] * len(v))
188188

189189
assert len(lines), len(expected) == io.stdout
190190
for line, expect in zip(lines, expected):

ipyparallel/tests/test_view.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ def test_execute_magic(self):
614614
def test_execute_displaypub(self):
615615
"""execute tracks display_pub output"""
616616
view = self.client[:]
617-
view.execute("from IPython.core.display import *")
617+
view.execute("from IPython.display import *")
618618
ar = view.execute("[ display(i) for i in range(5) ]", block=True)
619619

620620
expected = [{'text/plain': str(j)} for j in range(5)]
@@ -625,7 +625,7 @@ def test_execute_displaypub(self):
625625
def test_apply_displaypub(self):
626626
"""apply tracks display_pub output"""
627627
view = self.client[:]
628-
view.execute("from IPython.core.display import *")
628+
view.execute("from IPython.display import *")
629629

630630
@interactive
631631
def publish():

0 commit comments

Comments
 (0)