Exemplo n.º 1
0
    def test_get_slice_bounds_within(self, kind, side, expected):
        index = Index(range(6))
        with tm.assert_produces_warning(FutureWarning,
                                        match="'kind' argument"):

            result = index.get_slice_bound(4, kind=kind, side=side)
        assert result == expected
Exemplo n.º 2
0
 def test_get_slice_bounds_outside(self, kind, side, expected, bound):
     index = Index(range(6))
     result = index.get_slice_bound(bound, kind=kind, side=side)
     assert result == expected
Exemplo n.º 3
0
 def test_get_slice_bounds_within(self, kind, side, expected):
     index = Index(range(6))
     result = index.get_slice_bound(4, kind=kind, side=side)
     assert result == expected
Exemplo n.º 4
0
 def test_get_slice_bounds_within(self, kind, side, expected):
     index = Index(list("abcdef"))
     result = index.get_slice_bound("e", kind=kind, side=side)
     assert result == expected
Exemplo n.º 5
0
 def test_get_slice_bounds_outside(self, kind, side, expected, data, bound):
     index = Index(data)
     with tm.assert_produces_warning(FutureWarning,
                                     match="'kind' argument"):
         result = index.get_slice_bound(bound, kind=kind, side=side)
     assert result == expected