|
12 | 12 | import pandas as pd
|
13 | 13 | from pandas import DataFrame, Index, NaT, Series
|
14 | 14 | import pandas._testing as tm
|
15 |
| -from pandas.core.indexers import validate_indices |
16 | 15 | from pandas.core.indexing import _maybe_numeric_slice, _non_reducing_slice
|
17 | 16 | from pandas.tests.indexing.common import _mklbl
|
18 | 17 |
|
@@ -988,30 +987,6 @@ def test_none_coercion_mixed_dtypes(self):
|
988 | 987 | tm.assert_frame_equal(start_dataframe, exp)
|
989 | 988 |
|
990 | 989 |
|
991 |
| -def test_validate_indices_ok(): |
992 |
| - indices = np.asarray([0, 1]) |
993 |
| - validate_indices(indices, 2) |
994 |
| - validate_indices(indices[:0], 0) |
995 |
| - validate_indices(np.array([-1, -1]), 0) |
996 |
| - |
997 |
| - |
998 |
| -def test_validate_indices_low(): |
999 |
| - indices = np.asarray([0, -2]) |
1000 |
| - with pytest.raises(ValueError, match="'indices' contains"): |
1001 |
| - validate_indices(indices, 2) |
1002 |
| - |
1003 |
| - |
1004 |
| -def test_validate_indices_high(): |
1005 |
| - indices = np.asarray([0, 1, 2]) |
1006 |
| - with pytest.raises(IndexError, match="indices are out"): |
1007 |
| - validate_indices(indices, 2) |
1008 |
| - |
1009 |
| - |
1010 |
| -def test_validate_indices_empty(): |
1011 |
| - with pytest.raises(IndexError, match="indices are out"): |
1012 |
| - validate_indices(np.array([0, 1]), 0) |
1013 |
| - |
1014 |
| - |
1015 | 990 | def test_extension_array_cross_section():
|
1016 | 991 | # A cross-section of a homogeneous EA should be an EA
|
1017 | 992 | df = pd.DataFrame(
|
|
0 commit comments