Skip to content

Commit

Permalink
Updating with failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Apr 19, 2024
1 parent 2b68d45 commit b41d983
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions holoviews/tests/core/data/test_pandasinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,24 @@ def test_select(self):
selected = ds.select(number=1, color='red')
assert selected == 0

@pytest.mark.xfail(reason="Not working")
def test_select_not_monotonic(self):
frame = pd.DataFrame({"number": [1, 1, 2, 2], "color": [2, 1, 2, 1]})
index = pd.MultiIndex.from_frame(frame, names=frame.columns)
df = pd.DataFrame(range(4), index=index, columns=["values"])
ds = Dataset(df, kdims=list(frame.columns))

data = ds.select(color=slice(2, 3)).data
expected = pd.DataFrame({"number": [1, 2], "color": [2, 2], "values": [1, 3]}).set_index(['number', 'color'])
pd.testing.assert_frame_equal(data, expected)

@pytest.mark.xfail(reason="Not working")
def test_select_not_in_index(self):
ds = Dataset(self.df, kdims=["number", "color"])
selected = ds.select(number=[2, 3])
expected = ds.select(number=2)
pd.testing.assert_frame_equal(selected.data, expected.data)

def test_sample(self):
ds = Dataset(self.df, kdims=["number", "color"])
sample = ds.interface.sample(ds, [1])
Expand Down

0 comments on commit b41d983

Please sign in to comment.