Skip to content

Commit 34387bd

Browse files
TST (string dtype): avoid hardcoded object dtype for columns in datetime_frame fixture (#60192)
1 parent eacf032 commit 34387bd

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

pandas/tests/frame/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def datetime_frame() -> DataFrame:
1818
"""
1919
return DataFrame(
2020
np.random.default_rng(2).standard_normal((10, 4)),
21-
columns=Index(list("ABCD"), dtype=object),
21+
columns=Index(list("ABCD")),
2222
index=date_range("2000-01-01", periods=10, freq="B"),
2323
)
2424

pandas/tests/frame/indexing/test_indexing.py

-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ def test_getitem_boolean(self, mixed_float_frame, mixed_int_frame, datetime_fram
177177
if bif[c].dtype != bifw[c].dtype:
178178
assert bif[c].dtype == df[c].dtype
179179

180-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
181180
def test_getitem_boolean_casting(self, datetime_frame):
182181
# don't upcast if we don't need to
183182
df = datetime_frame.copy()

pandas/tests/frame/methods/test_to_csv.py

-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ def test_to_csv_from_csv1(self, temp_file, float_frame):
4444
float_frame.to_csv(path, header=False)
4545
float_frame.to_csv(path, index=False)
4646

47-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
4847
def test_to_csv_from_csv1_datetime(self, temp_file, datetime_frame):
4948
path = str(temp_file)
5049
# test roundtrip
@@ -549,7 +548,6 @@ def test_to_csv_headers(self, temp_file):
549548
assert return_value is None
550549
tm.assert_frame_equal(to_df, recons)
551550

552-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
553551
def test_to_csv_multiindex(self, temp_file, float_frame, datetime_frame):
554552
frame = float_frame
555553
old_index = frame.index

0 commit comments

Comments
 (0)