Skip to content

Commit d496125

Browse files
committed
TST(string dtype): Resolve HDF5 xfails
1 parent 59b3a1a commit d496125

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

pandas/io/pytables.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5297,6 +5297,8 @@ def _dtype_to_kind(dtype_str: str) -> str:
52975297
kind = "integer"
52985298
elif dtype_str == "object":
52995299
kind = "object"
5300+
elif dtype_str == "str":
5301+
kind = "str"
53005302
else:
53015303
raise ValueError(f"cannot interpret dtype of [{dtype_str}]")
53025304

pandas/tests/io/pytables/test_subclass.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import numpy as np
22
import pytest
33

4-
from pandas._config import using_string_dtype
5-
64
from pandas import (
75
DataFrame,
86
Series,
@@ -19,7 +17,6 @@
1917

2018
class TestHDFStoreSubclass:
2119
# GH 33748
22-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
2320
def test_supported_for_subclass_dataframe(self, tmp_path):
2421
data = {"a": [1, 2], "b": [3, 4]}
2522
sdf = tm.SubclassedDataFrame(data, dtype=np.intp)

pandas/tests/io/test_common.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
import numpy as np
2020
import pytest
2121

22-
from pandas._config import using_string_dtype
23-
2422
from pandas.compat import (
2523
WASM,
2624
is_platform_windows,
@@ -365,7 +363,6 @@ def test_write_fspath_all(self, writer_name, writer_kwargs, module):
365363
expected = f_path.read()
366364
assert result == expected
367365

368-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string) hdf support")
369366
def test_write_fspath_hdf5(self):
370367
# Same test as write_fspath_all, except HDF5 files aren't
371368
# necessarily byte-for-byte identical for a given dataframe, so we'll

0 commit comments

Comments
 (0)