Skip to content

Commit 7a9d77b

Browse files
author
y-p
committed
TST: accept timezone info when parsing string slice GH2658
1 parent f7f7e13 commit 7a9d77b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tseries/tests/test_timeseries.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,6 +1399,14 @@ def _simple_ts(start, end, freq='D'):
13991399
class TestDatetimeIndex(unittest.TestCase):
14001400
_multiprocess_can_split_ = True
14011401

1402+
def test_stringified_slice_with_tz(self):
1403+
#GH2658
1404+
import datetime
1405+
start=datetime.datetime.now()
1406+
idx=DatetimeIndex(start=start,freq="1d",periods=10)
1407+
df=DataFrame(range(10),index=idx)
1408+
df["2013-01-14 23:44:34.437768-05:00":] # no exception here
1409+
14021410
def test_append_join_nondatetimeindex(self):
14031411
rng = date_range('1/1/2000', periods=10)
14041412
idx = Index(['a', 'b', 'c', 'd'])

0 commit comments

Comments
 (0)