Skip to content

Commit

Permalink
Added test to reproduce issue pandas-dev#16583
Browse files Browse the repository at this point in the history
  • Loading branch information
frexvahi committed Jun 6, 2017
1 parent bf99975 commit 5e0b9c3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pandas/tests/io/test_pytables.py
Original file line number Diff line number Diff line change
Expand Up @@ -5191,6 +5191,14 @@ def test_query_compare_column_type(self):
expected = df.loc[[], :]
tm.assert_frame_equal(expected, result)

def test_read_hdf_series_fixed(self):
# GH 16583
series = pd.Series([1, 2, 3])
with ensure_clean_path(self.path) as path:
series.to_hdf(path, key='data', format='fixed')
result = pd.read_hdf(path, key='data', mode='r')
assert (result == series).all()

@pytest.mark.skipif(sys.version_info < (3, 6), reason="Need python 3.6")
def test_fspath(self):
with tm.ensure_clean('foo.h5') as path:
Expand Down

0 comments on commit 5e0b9c3

Please sign in to comment.