Skip to content

Commit

Permalink
Fixed various issues with test imports
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Sep 25, 2019
1 parent d9dc53b commit 1bc46da
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
11 changes: 10 additions & 1 deletion holoviews/tests/core/testdatasetproperty.py
Expand Up @@ -12,7 +12,11 @@
from holoviews.core import Apply, Redim
from holoviews.element.comparison import ComparisonTestCase
from holoviews.operation import histogram
from holoviews.operation.datashader import dynspread, datashade, rasterize

try:
from holoviews.operation.datashader import dynspread, datashade, rasterize
except:
dynspread = datashade = rasterize = None



Expand Down Expand Up @@ -715,6 +719,11 @@ def test_distribution_dataset(self):

class DatashaderTestCase(DatasetPropertyTestCase):

def setUp(self):
if None in (rasterize, datashade, dynspread):
raise SkipTest('Datashader could not be imported and cannot be tested.')
super(DatashaderTestCase, self).setUp()

def test_rasterize_curve(self):
img = rasterize(
self.ds.to(Curve, 'a', 'b', groupby=[]), dynamic=False
Expand Down
13 changes: 8 additions & 5 deletions holoviews/tests/plotting/plotly/testcallbacks.py
Expand Up @@ -12,11 +12,14 @@
except:
go = None

from holoviews.plotting.plotly.callbacks import (
RangeXYCallback, RangeXCallback, RangeYCallback,
BoundsXYCallback, BoundsXCallback, BoundsYCallback,
Selection1DCallback
)
try:
from holoviews.plotting.plotly.callbacks import (
RangeXYCallback, RangeXCallback, RangeYCallback,
BoundsXYCallback, BoundsXCallback, BoundsYCallback,
Selection1DCallback
)
except:
pass


def mock_plot(trace_uid=None):
Expand Down
2 changes: 1 addition & 1 deletion holoviews/tests/plotting/plotly/testrenderer.py
Expand Up @@ -27,7 +27,7 @@
class PlotlyRendererTest(ComparisonTestCase):

def setUp(self):
if 'plotly' not in Store.renderers and None not in (pn, PlotlyRenderer):
if 'plotly' not in Store.renderers or None in (pn, PlotlyRenderer):
raise SkipTest("Plotly and Panel required to test rendering.")

self.previous_backend = Store.current_backend
Expand Down

0 comments on commit 1bc46da

Please sign in to comment.