Skip to content

Commit d43d088

Browse files
committed
TST: incorrect localization in append testing
1 parent 9c98e13 commit d43d088

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pandas/tests/test_multilevel.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ def test_append_index(self):
8383
# GH 7112
8484
import pytz
8585
tz = pytz.timezone('Asia/Tokyo')
86-
expected_tuples = [(1.1, datetime.datetime(2011, 1, 1, tzinfo=tz)),
87-
(1.2, datetime.datetime(2011, 1, 2, tzinfo=tz)),
88-
(1.3, datetime.datetime(2011, 1, 3, tzinfo=tz))]
86+
expected_tuples = [(1.1, tz.localize(datetime.datetime(2011, 1, 1))),
87+
(1.2, tz.localize(datetime.datetime(2011, 1, 2))),
88+
(1.3, tz.localize(datetime.datetime(2011, 1, 3)))]
8989
expected = Index([1.1, 1.2, 1.3] + expected_tuples)
9090
tm.assert_index_equal(result, expected)
9191

@@ -103,9 +103,9 @@ def test_append_index(self):
103103

104104
result = midx_lv3.append(midx_lv2)
105105
expected = Index._simple_new(
106-
np.array([(1.1, datetime.datetime(2011, 1, 1, tzinfo=tz), 'A'),
107-
(1.2, datetime.datetime(2011, 1, 2, tzinfo=tz), 'B'),
108-
(1.3, datetime.datetime(2011, 1, 3, tzinfo=tz), 'C')] +
106+
np.array([(1.1, tz.localize(datetime.datetime(2011, 1, 1)), 'A'),
107+
(1.2, tz.localize(datetime.datetime(2011, 1, 2)), 'B'),
108+
(1.3, tz.localize(datetime.datetime(2011, 1, 3)), 'C')] +
109109
expected_tuples), None)
110110
tm.assert_index_equal(result, expected)
111111

0 commit comments

Comments
 (0)