Skip to content

Commit b5e2d9d

Browse files
committed
Fix orca image renderers test
1 parent 356f31e commit b5e2d9d

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

plotly/offline/offline.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def _build_mathjax_script(url):
105105
.format(url=url))
106106

107107

108-
def _get_jconfig(config):
108+
def _get_jconfig(config=None):
109109

110110
configkeys = (
111111
'staticPlot',
@@ -316,10 +316,10 @@ def iplot(figure_or_data, show_link=False, link_text='Export to plot.ly',
316316
`show_link` and `link_text` set the associated options in this
317317
dictionary if it doesn't contain them already.
318318
auto_play (default=True) -- Whether to automatically start the animation
319-
sequence on page load, if the figure contains frames. Has no effect if
319+
sequence on page load, if the figure contains frames. Has no effect if
320320
the figure does not contain frames.
321-
animation_opts (default=None) -- Dict of custom animation parameters that
322-
are used for the automatically started animation on page load. This
321+
animation_opts (default=None) -- Dict of custom animation parameters that
322+
are used for the automatically started animation on page load. This
323323
dict is passed to the function Plotly.animate in Plotly.js. See
324324
https://github.com/plotly/plotly.js/blob/master/src/plots/animation_attributes.js
325325
for available options. Has no effect if the figure
@@ -493,8 +493,8 @@ def plot(figure_or_data, show_link=False, link_text='Export to plot.ly',
493493
auto_play (default=True) -- Whether to automatically start the animation
494494
sequence on page load if the figure contains frames. Has no effect if
495495
the figure does not contain frames.
496-
animation_opts (default=None) -- Dict of custom animation parameters that
497-
are used for the automatically started animation on page load. This
496+
animation_opts (default=None) -- Dict of custom animation parameters that
497+
are used for the automatically started animation on page load. This
498498
dict is passed to the function Plotly.animate in Plotly.js. See
499499
https://github.com/plotly/plotly.js/blob/master/src/plots/animation_attributes.js
500500
for available options. Has no effect if the figure

plotly/tests/test_orca/test_image_renderers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
from plotly import io as pio
99
import plotly.graph_objs as go
10-
from plotly.config import get_config
10+
11+
from plotly.offline.offline import _get_jconfig
1112

1213
if sys.version_info.major == 3 and sys.version_info.minor >= 3:
1314
import unittest.mock as mock
@@ -119,7 +120,7 @@ def test_mimetype_combination(fig1):
119120
pio.to_json(fig1, remove_uids=False))
120121

121122
plotly_mimetype_dict['config'] = {
122-
'plotlyServerURL': get_config()['plotly_domain']}
123+
'plotlyServerURL': _get_jconfig()['plotlyServerURL']}
123124

124125
# Build expected bundle
125126
expected = {
@@ -132,4 +133,4 @@ def test_mimetype_combination(fig1):
132133

133134
pio.renderers.render_on_display = True
134135
bundle = fig1._repr_mimebundle_(None, None)
135-
assert bundle == expected
136+
assert bundle == expected

0 commit comments

Comments
 (0)