From 03af717e57e9baa9342250f64cfeee94ee0976dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Thu, 15 Feb 2024 17:36:54 +0100 Subject: [PATCH] Add test case for pandas range index --- holoviews/tests/core/data/test_pandasinterface.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/holoviews/tests/core/data/test_pandasinterface.py b/holoviews/tests/core/data/test_pandasinterface.py index ce465e094d..ed5d8f51d5 100644 --- a/holoviews/tests/core/data/test_pandasinterface.py +++ b/holoviews/tests/core/data/test_pandasinterface.py @@ -163,6 +163,11 @@ def test_dataset_with_interface_column(self): ds = Dataset(df) self.assertEqual(list(ds.data.columns), ['interface']) + def test_dataset_range_with_object_index(self): + df = pd.DataFrame(range(4), columns=["values"], index=list("BADC")) + ds = Dataset(df, kdims='index') + assert ds.range('index') == ('A', 'D') + class PandasInterfaceTests(BasePandasInterfaceTests):