def test_get_slice_bound_missing(label, side, kind): mylist = [2, 4, 6, 8, 10] index = GenericIndex(mylist) index_pd = pd.Index(mylist) assert index.get_slice_bound( label, side, kind ) == index_pd.get_slice_bound(label, side, kind)
def test_get_slice_bound(testlist, side, kind): index = GenericIndex(testlist) index_pd = pd.Index(testlist) for label in testlist: assert index.get_slice_bound( label, side, kind ) == index_pd.get_slice_bound(label, side, kind)
def test_get_slice_bound_missing_str(label, side): # Slicing for monotonic string indices not yet supported # when missing values are specified (allowed in pandas) mylist = ["b", "d", "f"] index = GenericIndex(mylist) index_pd = pd.Index(mylist) assert index.get_slice_bound( label, side, "getitem" ) == index_pd.get_slice_bound(label, side, "getitem")