Skip to content

Commit cff22d4

Browse files
Use temp_file
1 parent 43b0560 commit cff22d4

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

pandas/tests/io/test_parquet.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -1131,17 +1131,15 @@ def test_infer_string_large_string_type(self, tmp_path, pa):
11311131
# assert result["strings"].dtype == "string"
11321132
# FIXME: don't leave commented-out
11331133

1134-
def test_non_nanosecond_timestamps(self):
1134+
def test_non_nanosecond_timestamps(self, temp_file):
11351135
# GH#49236
11361136
import pyarrow as pa
11371137
import pyarrow.parquet as pq
11381138

1139-
with tm.ensure_clean() as path:
1140-
arr = pa.array([datetime.datetime(1600, 1, 1)], type=pa.timestamp("us"))
1141-
table = pa.table([arr], names=["timestamp"])
1142-
pq.write_table(table, path)
1143-
result = read_parquet(path)
1144-
1139+
arr = pa.array([datetime.datetime(1600, 1, 1)], type=pa.timestamp("us"))
1140+
table = pa.table([arr], names=["timestamp"])
1141+
pq.write_table(table, temp_file)
1142+
result = read_parquet(temp_file)
11451143
expected = pd.DataFrame(
11461144
data={"timestamp": [datetime.datetime(1600, 1, 1)]},
11471145
dtype="datetime64[us]",

0 commit comments

Comments
 (0)