@@ -686,6 +686,10 @@ def test_add(self):
686686 # - API change GH 8226
687687 with tm .assert_produces_warning ():
688688 self .strIndex + self .strIndex
689+ with tm .assert_produces_warning ():
690+ self .strIndex + self .strIndex .tolist ()
691+ with tm .assert_produces_warning ():
692+ self .strIndex .tolist () + self .strIndex
689693
690694 firstCat = self .strIndex .union (self .dateIndex )
691695 secondCat = self .strIndex .union (self .strIndex )
@@ -772,6 +776,7 @@ def test_difference(self):
772776 assertRaisesRegexp (TypeError , "iterable" , first .difference , 0.5 )
773777
774778 def test_symmetric_diff (self ):
779+
775780 # smoke
776781 idx1 = Index ([1 , 2 , 3 , 4 ], name = 'idx1' )
777782 idx2 = Index ([2 , 3 , 4 , 5 ])
@@ -819,7 +824,7 @@ def test_symmetric_diff(self):
819824
820825 # other isn't iterable
821826 with tm .assertRaises (TypeError ):
822- Index (idx1 ,dtype = 'object' ) - 1
827+ Index (idx1 ,dtype = 'object' ). difference ( 1 )
823828
824829 def test_is_numeric (self ):
825830 self .assertFalse (self .dateIndex .is_numeric ())
@@ -3899,8 +3904,8 @@ def test_difference(self):
38993904 self .index [- 3 :] - first
39003905 with tm .assert_produces_warning ():
39013906 self .index [- 3 :] - first .tolist ()
3902- with tm . assert_produces_warning ():
3903- first .tolist () - self .index [- 3 :]
3907+
3908+ self . assertRaises ( TypeError , lambda : first .tolist () - self .index [- 3 :])
39043909
39053910 expected = MultiIndex .from_tuples (sorted (self .index [:- 3 ].values ),
39063911 sortorder = 0 ,
0 commit comments