@@ -627,6 +627,7 @@ def test_repr_max_seq_item_setting(self):
627627 def test_repr_roundtrip (self ):
628628 super (TestIntervalIndex , self ).test_repr_roundtrip ()
629629
630+ # TODO: check this behavior is consistent with test_interval_new.py
630631 def test_get_item (self , closed ):
631632 i = IntervalIndex .from_arrays ((0 , 1 , np .nan ), (1 , 2 , np .nan ),
632633 closed = closed )
@@ -647,6 +648,7 @@ def test_get_item(self, closed):
647648 closed = closed )
648649 tm .assert_index_equal (result , expected )
649650
651+ # To be removed, replaced by test_interval_new.py (see #16316, #16386)
650652 def test_get_loc_value (self ):
651653 pytest .raises (KeyError , self .index .get_loc , 0 )
652654 assert self .index .get_loc (0.5 ) == 0
@@ -669,6 +671,7 @@ def test_get_loc_value(self):
669671 idx = IntervalIndex .from_arrays ([0 , 2 ], [1 , 3 ])
670672 pytest .raises (KeyError , idx .get_loc , 1.5 )
671673
674+ # To be removed, replaced by test_interval_new.py (see #16316, #16386)
672675 def slice_locs_cases (self , breaks ):
673676 # TODO: same tests for more index types
674677 index = IntervalIndex .from_breaks ([0 , 1 , 2 ], closed = 'right' )
@@ -697,12 +700,15 @@ def slice_locs_cases(self, breaks):
697700 assert index .slice_locs (1 , 1 ) == (0 , 1 )
698701 assert index .slice_locs (1 , 2 ) == (0 , 2 )
699702
703+ # To be removed, replaced by test_interval_new.py (see #16316, #16386)
700704 def test_slice_locs_int64 (self ):
701705 self .slice_locs_cases ([0 , 1 , 2 ])
702706
707+ # To be removed, replaced by test_interval_new.py (see #16316, #16386)
703708 def test_slice_locs_float64 (self ):
704709 self .slice_locs_cases ([0.0 , 1.0 , 2.0 ])
705710
711+ # To be removed, replaced by test_interval_new.py (see #16316, #16386)
706712 def slice_locs_decreasing_cases (self , tuples ):
707713 index = IntervalIndex .from_tuples (tuples )
708714 assert index .slice_locs (1.5 , 0.5 ) == (1 , 3 )
@@ -716,17 +722,21 @@ def slice_locs_decreasing_cases(self, tuples):
716722 slice_locs = index .slice_locs (- 1 , - 1 )
717723 assert slice_locs [0 ] == slice_locs [1 ]
718724
725+ # To be removed, replaced by test_interval_new.py (see #16316, #16386)
719726 def test_slice_locs_decreasing_int64 (self ):
720727 self .slice_locs_cases ([(2 , 4 ), (1 , 3 ), (0 , 2 )])
721728
729+ # To be removed, replaced by test_interval_new.py (see #16316, #16386)
722730 def test_slice_locs_decreasing_float64 (self ):
723731 self .slice_locs_cases ([(2. , 4. ), (1. , 3. ), (0. , 2. )])
724732
733+ # To be removed, replaced by test_interval_new.py (see #16316, #16386)
725734 def test_slice_locs_fails (self ):
726735 index = IntervalIndex .from_tuples ([(1 , 2 ), (0 , 1 ), (2 , 3 )])
727736 with pytest .raises (KeyError ):
728737 index .slice_locs (1 , 2 )
729738
739+ # To be removed, replaced by test_interval_new.py (see #16316, #16386)
730740 def test_get_loc_interval (self ):
731741 assert self .index .get_loc (Interval (0 , 1 )) == 0
732742 assert self .index .get_loc (Interval (0 , 0.5 )) == 0
@@ -735,6 +745,7 @@ def test_get_loc_interval(self):
735745 pytest .raises (KeyError , self .index .get_loc ,
736746 Interval (- 1 , 0 , 'left' ))
737747
748+ # To be removed, replaced by test_interval_new.py (see #16316, #16386)
738749 def test_get_indexer (self ):
739750 actual = self .index .get_indexer ([- 1 , 0 , 0.5 , 1 , 1.5 , 2 , 3 ])
740751 expected = np .array ([- 1 , - 1 , 0 , 0 , 1 , 1 , - 1 ], dtype = 'intp' )
@@ -757,6 +768,7 @@ def test_get_indexer(self):
757768 expected = np .array ([- 1 , 1 ], dtype = 'intp' )
758769 tm .assert_numpy_array_equal (actual , expected )
759770
771+ # To be removed, replaced by test_interval_new.py (see #16316, #16386)
760772 def test_get_indexer_subintervals (self ):
761773
762774 # TODO: is this right?
@@ -780,6 +792,7 @@ def test_get_indexer_subintervals(self):
780792 expected = np .array ([0 , 0 , 0 ], dtype = 'intp' )
781793 tm .assert_numpy_array_equal (actual , expected )
782794
795+ # To be removed, replaced by test_interval_new.py (see #16316, #16386)
783796 def test_contains (self ):
784797 # Only endpoints are valid.
785798 i = IntervalIndex .from_arrays ([0 , 1 ], [1 , 2 ])
@@ -796,6 +809,7 @@ def test_contains(self):
796809 assert Interval (3 , 5 ) not in i
797810 assert Interval (- 1 , 0 , closed = 'left' ) not in i
798811
812+ # To be removed, replaced by test_interval_new.py (see #16316, #16386)
799813 def testcontains (self ):
800814 # can select values that are IN the range of a value
801815 i = IntervalIndex .from_arrays ([0 , 1 ], [1 , 2 ])
@@ -827,6 +841,7 @@ def test_dropna(self, closed):
827841 result = ii .dropna ()
828842 tm .assert_index_equal (result , expected )
829843
844+ # TODO: check this behavior is consistent with test_interval_new.py
830845 def test_non_contiguous (self , closed ):
831846 index = IntervalIndex .from_tuples ([(0 , 1 ), (2 , 3 )], closed = closed )
832847 target = [0.5 , 1.5 , 2.5 ]
0 commit comments