Skip to content

Commit 964c908

Browse files
committed
update slow test
1 parent affa6f0 commit 964c908

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pandas/tests/frame/methods/test_to_csv.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def test_to_csv_nrows(self, nrows, temp_file):
359359
columns=Index(list("abcd"), dtype=object),
360360
)
361361
result, expected = self._return_result_expected(df, 1000, temp_file, "dt", "s")
362-
expected.index = expected.index.astype("M8[ns]")
362+
expected.index = expected.index.astype("M8[us]")
363363
tm.assert_frame_equal(result, expected, check_names=False)
364364

365365
@pytest.mark.slow
@@ -390,9 +390,13 @@ def test_to_csv_idx_types(self, nrows, r_idx_type, c_idx_type, ncols, temp_file)
390390
r_idx_type,
391391
c_idx_type,
392392
)
393-
if r_idx_type in ["dt", "p"]:
393+
if r_idx_type == "dt":
394+
expected.index = expected.index.astype("M8[us]")
395+
elif r_idx_type == "p":
394396
expected.index = expected.index.astype("M8[ns]")
395-
if c_idx_type in ["dt", "p"]:
397+
if c_idx_type == "dt":
398+
expected.columns = expected.columns.astype("M8[us]")
399+
elif c_idx_type == "p":
396400
expected.columns = expected.columns.astype("M8[ns]")
397401
tm.assert_frame_equal(result, expected, check_names=False)
398402

0 commit comments

Comments
 (0)