MCPcopy Create free account
hub / github.com/holoviz/hvplot / TestPatchXArray

Class TestPatchXArray

hvplot/tests/testpatch.py:51–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50
51class TestPatchXArray(TestCase):
52 def setUp(self):
53 try:
54 import xarray as xr # noqa
55 except ImportError:
56 raise SkipTest('XArray not available')
57 import hvplot.xarray # noqa
58
59 def test_xarray_dataarray_patched(self):
60 import xarray as xr
61
62 array = np.random.rand(100, 100)
63 xr_array = xr.DataArray(array, coords={'x': range(100), 'y': range(100)}, dims=('y', 'x'))
64 self.assertIsInstance(xr_array.hvplot, hvPlot)
65
66 def test_xarray_dataset_patched(self):
67 import xarray as xr
68
69 array = np.random.rand(100, 100)
70 xr_array = xr.DataArray(array, coords={'x': range(100), 'y': range(100)}, dims=('y', 'x'))
71 xr_ds = xr.Dataset({'z': xr_array})
72 self.assertIsInstance(xr_ds.hvplot, hvPlot)
73
74
75class TestPatchStreamz(TestCase):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…