Skip to content

Commit 743d498

Browse files
committed
Py2 tests not needed any more
1 parent 4496c0d commit 743d498

File tree

3 files changed

+8
-17
lines changed

3 files changed

+8
-17
lines changed

pandas/core/indexes/multi.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,10 @@ def set_codes(self, codes, level=None, inplace=False,
760760
761761
Examples
762762
--------
763-
>>> idx = pd.MultiIndex.from_tuples([(1, 'one'), (1, 'two'),
764-
(2, 'one'), (2, 'two')],
763+
>>> idx = pd.MultiIndex.from_tuples([(1, 'one'),
764+
(1, 'two'),
765+
(2, 'one'),
766+
(2, 'two')],
765767
names=['foo', 'bar'])
766768
>>> idx.set_codes([[1, 0, 1, 0], [0, 0, 1, 1]])
767769
MultiIndex([(2, 'one'),

pandas/io/formats/printing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,11 @@ def _justify(head, tail):
451451
>>> _justify([['a', 'b']], [['abc', 'abcd']])
452452
([(' a', ' b')], [('abc', 'abcd')])
453453
"""
454-
combined = head + tail # type: Sequence[Sequence[str]]
454+
combined = head + tail
455455

456456
# For each position for the sequences in ``combined``,
457457
# find the length of the largest string.
458-
max_length = [0] * len(combined[0]) # type: List[int]
458+
max_length = [0] * len(combined[0])
459459
for inner_seq in combined:
460460
length = [len(item) for item in inner_seq]
461461
max_length = [max(x, y) for x, y in zip(max_length, length)]

pandas/tests/util/test_assert_index_equal.py

+2-13
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
import pytest
33

44
from pandas import Categorical, Index, MultiIndex, NaT
5-
from pandas.util.testing import PY3, assert_index_equal
5+
from pandas.util.testing import assert_index_equal
66

77

88
def test_index_equal_levels_mismatch():
9-
if PY3:
10-
msg = """Index are different
9+
msg = """Index are different
1110
1211
Index levels are different
1312
\\[left\\]: 1, Int64Index\\(\\[1, 2, 3\\], dtype='int64'\\)
@@ -16,16 +15,6 @@ def test_index_equal_levels_mismatch():
1615
\\('B', 3\\),
1716
\\('B', 4\\)\\],
1817
\\)"""
19-
else:
20-
msg = """Index are different
21-
22-
Index levels are different
23-
\\[left\\]: 1, Int64Index\\(\\[1, 2, 3\\], dtype='int64'\\)
24-
\\[right\\]: 2, MultiIndex\\(\\[\\(u'A', 1\\),
25-
\\(u'A', 2\\),
26-
\\(u'B', 3\\),
27-
\\(u'B', 4\\)\\],
28-
\\)"""
2918

3019
idx1 = Index([1, 2, 3])
3120
idx2 = MultiIndex.from_tuples([("A", 1), ("A", 2),

0 commit comments

Comments
 (0)