Skip to content

Commit

Permalink
add patch tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt committed Sep 28, 2023
1 parent 40f8b9c commit 384ee83
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions hvplot/tests/testpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,28 @@ def test_streamz_seriess_patched(self):
from streamz.dataframe import Random
random_df = Random()
self.assertIsInstance(random_df.groupby('x').sum().y.hvplot, hvPlotTabular)


class TestPatchPolars(TestCase):

def setUp(self):
try:
import polars as pl # noqa
except:
raise SkipTest('Polars not available')
import hvplot.polars # noqa

def test_polars_series_patched(self):
import polars as pl
pseries = pl.Series([0, 1, 2])
self.assertIsInstance(pseries.hvplot, hvPlotTabular)

def test_polars_dataframe_patched(self):
import polars as pl
pdf = pl.DataFrame({'x': [1, 3, 5], 'y': [2, 4, 6]})
self.assertIsInstance(pdf.hvplot, hvPlotTabular)

def test_polars_lazyframe_patched(self):
import polars as pl
pldf = pl.LazyFrame({'x': [1, 3, 5], 'y': [2, 4, 6]})
self.assertIsInstance(pldf.hvplot, hvPlotTabular)

0 comments on commit 384ee83

Please sign in to comment.