Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Changed assert location
  • Loading branch information
Jean-Mathieu Deschenes committed Jul 13, 2017
commit 3d366951ae620c741932f056a4689e61718133ad
3 changes: 3 additions & 0 deletions pandas/tests/indexes/timedeltas/test_timedelta.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ def test_get_loc(self):
for method, loc in [('pad', 1), ('backfill', 2), ('nearest', 1)]:
assert idx.get_loc('1 day 1 hour', method) == loc

# GH 16896
assert idx.get_loc('0 days') == 0

def test_get_loc_nat(self):
tidx = TimedeltaIndex(['1 days 01:00:00', 'NaT', '2 days 01:00:00'])

Expand Down
2 changes: 0 additions & 2 deletions pandas/tests/indexing/test_timedelta.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,3 @@ def test_string_indexing(self):
expected = df.iloc[0]
sliced = df.loc['0 days']
tm.assert_series_equal(sliced, expected)

assert df.index.get_loc('0 days') == 0