Skip to content

Commit 3ae2256

Browse files
committed
Update to_dict_of_blocks test to hardcode object dtype
1 parent b6d762b commit 3ae2256

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pandas/tests/frame/methods/test_to_dict_of_blocks.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
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
MultiIndex,
7+
Series,
98
)
109
import pandas._testing as tm
1110
from pandas.core.arrays import NumpyExtensionArray
@@ -27,10 +26,9 @@ def test_no_copy_blocks(self, float_frame):
2726
assert _last_df is not None and not _last_df[column].equals(df[column])
2827

2928

30-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
3129
def test_to_dict_of_blocks_item_cache():
3230
# Calling to_dict_of_blocks should not poison item_cache
33-
df = DataFrame({"a": [1, 2, 3, 4], "b": ["a", "b", "c", "d"]})
31+
df = DataFrame({"a": [1, 2, 3, 4], "b": Series(["a", "b", "c", "d"], dtype=object)})
3432
df["c"] = NumpyExtensionArray(np.array([1, 2, None, 3], dtype=object))
3533
mgr = df._mgr
3634
assert len(mgr.blocks) == 3 # i.e. not consolidated

0 commit comments

Comments
 (0)