@@ -770,7 +770,7 @@ def test_sub(self):
770770 def test_map_identity_mapping (self ):
771771 # GH 12766
772772 for name , cur_index in self .indices .items ():
773- self .assert_index_equal (cur_index , cur_index .map (lambda x : x ))
773+ tm .assert_index_equal (cur_index , cur_index .map (lambda x : x ))
774774
775775 def test_map_with_tuples (self ):
776776 # GH 12766
@@ -779,35 +779,35 @@ def test_map_with_tuples(self):
779779 # returns an Index.
780780 boolean_index = tm .makeIntIndex (3 ).map (lambda x : (x ,))
781781 expected = Index ([(0 ,), (1 ,), (2 ,)])
782- self .assert_index_equal (boolean_index , expected )
782+ tm .assert_index_equal (boolean_index , expected )
783783
784784 # Test that returning a tuple from a map of a single index
785785 # returns a MultiIndex object.
786786 boolean_index = tm .makeIntIndex (3 ).map (lambda x : (x , x == 1 ))
787787 expected = MultiIndex .from_tuples ([(0 , False ), (1 , True ), (2 , False )])
788- self .assert_index_equal (boolean_index , expected )
788+ tm .assert_index_equal (boolean_index , expected )
789789
790790 # Test that returning a single object from a MultiIndex
791791 # returns an Index.
792792 first_level = ['foo' , 'bar' , 'baz' ]
793793 multi_index = MultiIndex .from_tuples (lzip (first_level , [1 , 2 , 3 ]))
794794 reduced_index = multi_index .map (lambda x : x [0 ])
795- self .assert_index_equal (reduced_index , Index (first_level ))
795+ tm .assert_index_equal (reduced_index , Index (first_level ))
796796
797797 def test_map_tseries_indices_return_index (self ):
798798 date_index = tm .makeDateIndex (10 )
799799 exp = Index ([1 ] * 10 )
800- self .assert_index_equal (exp , date_index .map (lambda x : 1 ))
800+ tm .assert_index_equal (exp , date_index .map (lambda x : 1 ))
801801
802802 period_index = tm .makePeriodIndex (10 )
803- self .assert_index_equal (exp , period_index .map (lambda x : 1 ))
803+ tm .assert_index_equal (exp , period_index .map (lambda x : 1 ))
804804
805805 tdelta_index = tm .makeTimedeltaIndex (10 )
806- self .assert_index_equal (exp , tdelta_index .map (lambda x : 1 ))
806+ tm .assert_index_equal (exp , tdelta_index .map (lambda x : 1 ))
807807
808808 date_index = tm .makeDateIndex (24 , freq = 'h' , name = 'hourly' )
809809 exp = Index (range (24 ), name = 'hourly' )
810- self .assert_index_equal (exp , date_index .map (lambda x : x .hour ))
810+ tm .assert_index_equal (exp , date_index .map (lambda x : x .hour ))
811811
812812 def test_append_multiple (self ):
813813 index = Index (['a' , 'b' , 'c' , 'd' , 'e' , 'f' ])
0 commit comments