Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaskruchten committed Sep 4, 2020
1 parent 682424f commit 91e269f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
23 changes: 12 additions & 11 deletions packages/python/plotly/plotly/io/_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,17 +340,18 @@ def to_html(
)

plotly_html_div = """\
<div>\
{mathjax_script}\
{load_plotlyjs}\
<div id="{id}" class="plotly-graph-div" \
style="height:{height}; width:{width};">\
</div>\
<script type="text/javascript">\
{require_start}window.PLOTLYENV=window.PLOTLYENV || {{}};{base_url_line}{script};{require_end}\
</script>\
</div>\
""".format(
<div>\
{mathjax_script}\
{load_plotlyjs}\
<div id="{id}" class="plotly-graph-div" \
style="height:{height}; width:{width};"></div>\
<script type="text/javascript">\
{require_start}\
window.PLOTLYENV=window.PLOTLYENV || {{}};{base_url_line}\
{script};\
{require_end}\
</script>\
</div>""".format(
mathjax_script=mathjax_script,
load_plotlyjs=load_plotlyjs,
id=plotdivid,
Expand Down
4 changes: 2 additions & 2 deletions packages/python/plotly/plotly/tests/test_io/test_renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,13 @@ def test_repr_html(renderer):
id_pattern = "cd462b94-79ce-42a2-887f-2650a761a144"
template = (
'<div> <script type="text/javascript">'
"window.PlotlyConfig = {MathJaxConfig: 'local'};</script> "
"window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n "
'<script src="https://cdn.plot.ly/plotly-latest.min.js"></script> '
'<div id="cd462b94-79ce-42a2-887f-2650a761a144" class="plotly-graph-div" '
'style="height:100%; width:100%;"></div> <script type="text/javascript">'
" window.PLOTLYENV=window.PLOTLYENV || {};"
' if (document.getElementById("cd462b94-79ce-42a2-887f-2650a761a144"))'
" { Plotly.newPlot( 'cd462b94-79ce-42a2-887f-2650a761a144',"
' { Plotly.newPlot( "cd462b94-79ce-42a2-887f-2650a761a144",'
' [], {"template": {}},'
' {"responsive": true} ) };'
" </script> </div>"
Expand Down

0 comments on commit 91e269f

Please sign in to comment.