Skip to content

Commit 6bdc5b1

Browse files
committed
revert changes
1 parent 1c94949 commit 6bdc5b1

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

pandas/tests/frame/test_alter_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def test_set_index_cast_datetimeindex(self):
261261
comp = comp.tz_localize(None)
262262
tm.assert_numpy_array_equal(result.values, comp.values)
263263

264-
# list of datetimes with a tzg
264+
# list of datetimes with a tz
265265
df['D'] = i.to_pydatetime()
266266
result = df['D']
267267
assert_series_equal(result, expected, check_names=False)

pandas/tests/indexes/multi/test_constructor.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
import re
44

55
import numpy as np
6-
import pytest
7-
from pandas._libs.tslib import Timestamp
8-
96
import pandas as pd
107
import pandas.util.testing as tm
8+
import pytest
119
from pandas import Index, MultiIndex, date_range
10+
from pandas._libs.tslib import Timestamp
1211
from pandas.compat import lrange, range
1312
from pandas.core.dtypes.cast import construct_1d_object_array_from_listlike
1413

@@ -24,7 +23,7 @@ def test_constructor_single_level():
2423

2524
def test_constructor_no_levels():
2625
tm.assert_raises_regex(ValueError, "non-zero number "
27-
"of levels/labels",
26+
"of levels/labels",
2827
MultiIndex, levels=[], labels=[])
2928
both_re = re.compile('Must pass both levels and labels')
3029
with tm.assert_raises_regex(TypeError, both_re):
@@ -57,7 +56,7 @@ def test_constructor_mismatched_label_levels(idx):
5756
labels = [np.array([1]), np.array([2]), np.array([3])]
5857
levels = ["a"]
5958
tm.assert_raises_regex(ValueError, "Length of levels and labels "
60-
"must be the same", MultiIndex,
59+
"must be the same", MultiIndex,
6160
levels=levels, labels=labels)
6261
length_error = re.compile('>= length of level')
6362
label_error = re.compile(r'Unequal label lengths: \[4, 2\]')
@@ -260,13 +259,13 @@ def test_from_arrays_invalid_input(invalid_array):
260259
def test_from_arrays_different_lengths(idx1, idx2):
261260
# see gh-13599
262261
tm.assert_raises_regex(ValueError, '^all arrays must '
263-
'be same length$',
262+
'be same length$',
264263
MultiIndex.from_arrays, [idx1, idx2])
265264

266265

267266
def test_from_tuples():
268267
tm.assert_raises_regex(TypeError, 'Cannot infer number of levels '
269-
'from empty list',
268+
'from empty list',
270269
MultiIndex.from_tuples, [])
271270

272271
expected = MultiIndex(levels=[[1, 3], [2, 4]],
@@ -391,6 +390,7 @@ def test_from_product_index_series_categorical(ordered, f):
391390

392391

393392
def test_from_product():
393+
394394
first = ['foo', 'bar', 'buz']
395395
second = ['a', 'b', 'c']
396396
names = ['first', 'second']
@@ -425,6 +425,7 @@ def test_from_product_iterator():
425425

426426

427427
def test_create_index_existing_name(idx):
428+
428429
# GH11193, when an existing index is passed, and a new name is not
429430
# specified, the new index should inherit the previous object name
430431
index = idx
@@ -463,9 +464,8 @@ def test_tuples_with_name_string():
463464
with pytest.raises(ValueError):
464465
pd.Index(li, name='a')
465466

466-
467467
def test_from_tuples_with_tuple_label():
468-
# test for fix of issue #15457, where the following raised a TypeError
468+
# GH 15457
469469
expected = pd.DataFrame([[2, 1, 2], [4, (1, 2), 3]], columns=['a', 'b', 'c']).set_index(['a', 'b'])
470470
idx = pd.MultiIndex.from_tuples([(2, 1), (4, (1, 2))], names=('a', 'b'))
471471
result = pd.DataFrame([2, 3], columns=['c'], index=idx)

0 commit comments

Comments
 (0)