Skip to content

Commit 16c270b

Browse files
committed
TST: Replace ensure_clean with temp_file in test_multi_thread.py
1 parent b917b37 commit 16c270b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/tests/io/parser/test_multi_thread.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def reader(arg):
127127

128128

129129
@xfail_pyarrow # ValueError: The 'nrows' option is not supported
130-
def test_multi_thread_path_multipart_read_csv(all_parsers):
130+
def test_multi_thread_path_multipart_read_csv(tmp_path, all_parsers):
131131
# see gh-11786
132132
num_tasks = 4
133133
num_rows = 48
@@ -149,10 +149,10 @@ def test_multi_thread_path_multipart_read_csv(all_parsers):
149149
}
150150
)
151151

152-
with tm.ensure_clean(file_name) as path:
153-
df.to_csv(path)
152+
path = tmp_path / file_name
153+
df.to_csv(path)
154154

155-
result = _generate_multi_thread_dataframe(parser, path, num_rows, num_tasks)
155+
result = _generate_multi_thread_dataframe(parser, path, num_rows, num_tasks)
156156

157157
expected = df[:]
158158
expected["date"] = expected["date"].astype("M8[s]")

0 commit comments

Comments
 (0)