Skip to content

Commit 2c79460

Browse files
TST: Enable HDF5 tests for StringDtype
1 parent d0c02fb commit 2c79460

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

pandas/tests/io/pytables/test_put.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,6 @@ def test_column_multiindex(tmp_path, setup_path, using_infer_string):
314314

315315
path = tmp_path / setup_path
316316
with HDFStore(path) as store:
317-
if using_infer_string:
318-
# TODO(infer_string) make this work for string dtype
319-
msg = "Saving a MultiIndex with an extension dtype is not supported."
320-
with pytest.raises(NotImplementedError, match=msg):
321-
store.put("df", df)
322-
return
323317
store.put("df", df)
324318
tm.assert_frame_equal(
325319
store["df"], expected, check_index_type=True, check_column_type=True

pandas/tests/io/pytables/test_read.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,6 @@ def test_read_hdf_open_store(tmp_path, setup_path, using_infer_string):
181181
df = df.set_index(keys="E", append=True)
182182

183183
path = tmp_path / setup_path
184-
if using_infer_string:
185-
# TODO(infer_string) make this work for string dtype
186-
msg = "Saving a MultiIndex with an extension dtype is not supported."
187-
with pytest.raises(NotImplementedError, match=msg):
188-
df.to_hdf(path, key="df", mode="w")
189-
return
190184
df.to_hdf(path, key="df", mode="w")
191185
direct = read_hdf(path, "df")
192186
with HDFStore(path, mode="r") as store:

pandas/tests/io/pytables/test_round_trip.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -434,12 +434,6 @@ def test_store_hierarchical(
434434
):
435435
frame = multiindex_dataframe_random_data
436436

437-
if using_infer_string:
438-
# TODO(infer_string) make this work for string dtype
439-
msg = "Saving a MultiIndex with an extension dtype is not supported."
440-
with pytest.raises(NotImplementedError, match=msg):
441-
_check_roundtrip(frame, tm.assert_frame_equal, path=temp_file)
442-
return
443437
_check_roundtrip(frame, tm.assert_frame_equal, path=temp_file)
444438
_check_roundtrip(frame.T, tm.assert_frame_equal, path=temp_file)
445439
_check_roundtrip(frame["A"], tm.assert_series_equal, path=temp_file)

0 commit comments

Comments
 (0)