Skip to content

Commit

Permalink
TST: unit test for #2329
Browse files Browse the repository at this point in the history
  • Loading branch information
wesm committed Nov 23, 2012
1 parent 9211fd5 commit 5971637
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ pandas 0.10.0
- Properly box datetime64 values when retrieving cross-section from
mixed-dtype DataFrame (#2272)
- Fix concatenation bug leading to #2057, #2257
- Fix regression in Index console formatting (#2319)

pandas 0.9.1
============
Expand Down
8 changes: 8 additions & 0 deletions pandas/tseries/tests/test_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -2141,6 +2141,14 @@ def test_dti_reset_index_round_trip(self):
d3 = d2.set_index('index')
assert_frame_equal(d1, d3)

# #2329
stamp = datetime(2012, 11, 22)
df = DataFrame([[stamp, 12.1]], columns=['Date', 'Value'])
df = df.set_index('Date')

self.assertEquals(df.index[0], stamp)
self.assertEquals(df.reset_index()['Date'][0], stamp)

def test_datetimeindex_union_join_empty(self):
dti = DatetimeIndex(start='1/1/2001', end='2/1/2001', freq='D')
empty = Index([])
Expand Down

0 comments on commit 5971637

Please sign in to comment.