|
7 | 7 | import pytest
|
8 | 8 |
|
9 | 9 | from pandas import (
|
10 |
| - DataFrame, MultiIndex, Series, _np_version_under1p14, compat, concat, |
11 |
| - merge, to_datetime) |
| 10 | + DataFrame, MultiIndex, Series, compat, concat, merge, to_datetime) |
12 | 11 | from pandas.core import common as com
|
13 | 12 | from pandas.core.sorting import (
|
14 | 13 | decons_group_index, get_group_index, is_int64_overflow_possible,
|
@@ -414,13 +413,10 @@ def test_mixed_integer_from_list(self):
|
414 | 413 | def test_unsortable(self):
|
415 | 414 | # GH 13714
|
416 | 415 | arr = np.array([1, 2, datetime.now(), 0, 3], dtype=object)
|
417 |
| - msg = (r"unorderable types: ({0} [<>] {1}|{1} [<>] {0})".format( |
418 |
| - r"int\(\)", r"datetime\.datetime\(\)") # noqa: E126 |
419 |
| - if _np_version_under1p14 else |
420 |
| - (r"'[<>]' not supported between instances of " |
421 |
| - r"({0} and {1}|{1} and {0})").format( |
422 |
| - "'int'", r"'datetime\.datetime'") |
423 |
| - ) |
| 416 | + msg = (r"'(<|>)' not supported between instances of ('" |
| 417 | + r"datetime\.datetime' and 'int'|'int' and 'datetime\.datetime" |
| 418 | + r"')|" |
| 419 | + r"unorderable types: int\(\) > datetime\.datetime\(\)") |
424 | 420 | with pytest.raises(TypeError, match=msg):
|
425 | 421 | safe_sort(arr)
|
426 | 422 |
|
|
0 commit comments