@@ -4255,12 +4255,36 @@ def test_path_pathlib(self):
4255
4255
lambda p : pd .read_hdf (p , 'df' ))
4256
4256
tm .assert_frame_equal (df , result )
4257
4257
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
+
4258
4270
def test_pickle_path_localpath (self ):
4259
4271
df = tm .makeDataFrame ()
4260
4272
result = tm .round_trip_pathlib (lambda p : df .to_hdf (p , 'df' ),
4261
4273
lambda p : pd .read_hdf (p , 'df' ))
4262
4274
tm .assert_frame_equal (df , result )
4263
4275
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
+
4264
4288
def _check_roundtrip (self , obj , comparator , compression = False , ** kwargs ):
4265
4289
4266
4290
options = {}
0 commit comments