Skip to content

Commit a7e284c

Browse files
committed
Use less data in test_dti_tz_localize
1 parent 848f162 commit a7e284c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/tests/indexes/datetimes/methods/test_tz_localize.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,23 +149,23 @@ def test_dti_tz_localize_pass_dates_to_utc(self, tzstr):
149149
@pytest.mark.parametrize("prefix", ["", "dateutil/"])
150150
def test_dti_tz_localize(self, prefix):
151151
tzstr = prefix + "US/Eastern"
152-
dti = date_range(start="1/1/2005", end="1/1/2005 0:00:30.256", freq="ms")
152+
dti = date_range(start="1/1/2005", end="1/1/2005 0:00:02.256", freq="ms")
153153
dti2 = dti.tz_localize(tzstr)
154154

155155
dti_utc = date_range(
156-
start="1/1/2005 05:00", end="1/1/2005 5:00:30.256", freq="ms", tz="utc"
156+
start="1/1/2005 05:00", end="1/1/2005 5:00:02.256", freq="ms", tz="utc"
157157
)
158158

159159
tm.assert_numpy_array_equal(dti2.values, dti_utc.values)
160160

161161
dti3 = dti2.tz_convert(prefix + "US/Pacific")
162162
tm.assert_numpy_array_equal(dti3.values, dti_utc.values)
163163

164-
dti = date_range(start="11/6/2011 1:59", end="11/6/2011 2:00", freq="ms")
164+
dti = date_range(start="11/6/2011 1:59:59", end="11/6/2011 2:00", freq="ms")
165165
with pytest.raises(ValueError, match="Cannot infer dst time"):
166166
dti.tz_localize(tzstr)
167167

168-
dti = date_range(start="3/13/2011 1:59", end="3/13/2011 2:00", freq="ms")
168+
dti = date_range(start="3/13/2011 1:59:59", end="3/13/2011 2:00", freq="ms")
169169
with pytest.raises(ValueError, match="2011-03-13 02:00:00"):
170170
dti.tz_localize(tzstr)
171171

0 commit comments

Comments
 (0)