7
7
from .common import Base
8
8
9
9
from pandas .compat import (is_platform_windows , range , lrange , lzip , u ,
10
- zip , PY3 )
10
+ zip , PY3 , PY36 )
11
11
import operator
12
12
import os
13
13
@@ -1774,7 +1774,12 @@ def create_index(self):
1774
1774
def test_order (self ):
1775
1775
idx = self .create_index ()
1776
1776
# 9816 deprecated
1777
- if PY3 :
1777
+ if PY36 :
1778
+ with tm .assertRaisesRegexp (TypeError , "'>' not supported "
1779
+ "between instances of 'str' and 'int'" ):
1780
+ with tm .assert_produces_warning (FutureWarning ):
1781
+ idx .order ()
1782
+ elif PY3 :
1778
1783
with tm .assertRaisesRegexp (TypeError , "unorderable types" ):
1779
1784
with tm .assert_produces_warning (FutureWarning ):
1780
1785
idx .order ()
@@ -1784,7 +1789,11 @@ def test_order(self):
1784
1789
1785
1790
def test_argsort (self ):
1786
1791
idx = self .create_index ()
1787
- if PY3 :
1792
+ if PY36 :
1793
+ with tm .assertRaisesRegexp (TypeError , "'>' not supported "
1794
+ "between instances of 'str' and 'int'" ):
1795
+ result = idx .argsort ()
1796
+ elif PY3 :
1788
1797
with tm .assertRaisesRegexp (TypeError , "unorderable types" ):
1789
1798
result = idx .argsort ()
1790
1799
else :
@@ -1794,7 +1803,11 @@ def test_argsort(self):
1794
1803
1795
1804
def test_numpy_argsort (self ):
1796
1805
idx = self .create_index ()
1797
- if PY3 :
1806
+ if PY36 :
1807
+ with tm .assertRaisesRegexp (TypeError , "'>' not supported "
1808
+ "between instances of 'str' and 'int'" ):
1809
+ result = np .argsort (idx )
1810
+ elif PY3 :
1798
1811
with tm .assertRaisesRegexp (TypeError , "unorderable types" ):
1799
1812
result = np .argsort (idx )
1800
1813
else :
0 commit comments