Skip to content

Commit

Permalink
Fix Plotly test
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Mar 24, 2024
1 parent a75c305 commit d456b05
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions panel/tests/pane/test_holoviews.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
plotly_available = pytest.mark.skipif(hv_plotly is None, reason="requires plotly backend")

from bokeh.models import (
Column as BkColumn, ColumnDataSource, GlyphRenderer, GridPlot,
ImportedStyleSheet, Line, Row as BkRow, Scatter, Select as BkSelect,
Slider as BkSlider, Spacer as BkSpacer,
Column as BkColumn, ColumnDataSource, GlyphRenderer, GridPlot, Line,
Row as BkRow, Scatter, Select as BkSelect, Slider as BkSlider,
Spacer as BkSpacer,
)
from bokeh.plotting import figure

Expand All @@ -30,9 +30,7 @@
from panel.layout import (
Column, FlexBox, HSpacer, Row,
)
from panel.pane import (
HoloViews, PaneBase, Plotly, panel,
)
from panel.pane import HoloViews, PaneBase, panel
from panel.tests.util import hv_available, mpl_available
from panel.theme import Native
from panel.util.warnings import PanelDeprecationWarning
Expand Down Expand Up @@ -237,17 +235,14 @@ def test_holoviews_pane_inherits_design_stylesheets(document, comm):
curve = hv.Curve([1, 2, 3]).opts(responsive=True, backend='plotly')
pane = HoloViews(curve, backend='plotly')


# Create pane
row = pane.get_root(document, comm=comm)

Native().apply(pane, row)

plotly_model = row.children[0]

assert len(plotly_model.stylesheets) == 6
stylesheets = [st.url for st in plotly_model.stylesheets if isinstance(st, ImportedStyleSheet)]
assert all(st in stylesheets for st in Plotly._stylesheets)
assert len(plotly_model.stylesheets) == 5

@hv_available
def test_holoviews_widgets_from_dynamicmap(document, comm):
Expand Down

0 comments on commit d456b05

Please sign in to comment.