Skip to content

Commit 8a4e291

Browse files
committed
xfail for pandas-dev#14704
1 parent 1ecbe0d commit 8a4e291

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

pandas/tests/io/test_pytables.py

+24
Original file line numberDiff line numberDiff line change
@@ -4255,12 +4255,36 @@ def test_path_pathlib(self):
42554255
lambda p: pd.read_hdf(p, 'df'))
42564256
tm.assert_frame_equal(df, result)
42574257

4258+
@pytest.mark.xfail(reason='pathlib currently doesnt workth with HDFStore')
4259+
def test_path_pathlib_hdfstore(self):
4260+
df = tm.makeDataFrame()
4261+
def writer(path):
4262+
with pd.HDFStore(path) as store:
4263+
df.to_hdf(store, 'df')
4264+
def reader(path):
4265+
with pd.HDFStore(path) as store:
4266+
pd.read_hdf(store, 'df')
4267+
result = tm.round_trip_pathlib(writer, reader)
4268+
tm.assert_frame_equal(df, result)
4269+
42584270
def test_pickle_path_localpath(self):
42594271
df = tm.makeDataFrame()
42604272
result = tm.round_trip_pathlib(lambda p: df.to_hdf(p, 'df'),
42614273
lambda p: pd.read_hdf(p, 'df'))
42624274
tm.assert_frame_equal(df, result)
42634275

4276+
@pytest.mark.xfail(reason='localpath currently doesnt workth with HDFStore')
4277+
def test_path_localpath_hdfstore(self):
4278+
df = tm.makeDataFrame()
4279+
def writer(path):
4280+
with pd.HDFStore(path) as store:
4281+
df.to_hdf(store, 'df')
4282+
def reader(path):
4283+
with pd.HDFStore(path) as store:
4284+
pd.read_hdf(store, 'df')
4285+
result = tm.round_trip_localpath(writer, reader)
4286+
tm.assert_frame_equal(df, result)
4287+
42644288
def _check_roundtrip(self, obj, comparator, compression=False, **kwargs):
42654289

42664290
options = {}

0 commit comments

Comments
 (0)