| 49 | |
| 50 | |
| 51 | class 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 | |
| 75 | class TestPatchStreamz(TestCase): |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…