Skip to content

Commit 0057ce9

Browse files
authored
TST: Replace ensure_clean with temp_file in test_multi_thread.py (#62615)
1 parent b917b37 commit 0057ce9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,7 @@ Datetimelike
948948
- Bug in :class:`Timestamp` constructor failing to raise when given a ``np.datetime64`` object with non-standard unit (:issue:`25611`)
949949
- Bug in :func:`date_range` where the last valid timestamp would sometimes not be produced (:issue:`56134`)
950950
- Bug in :func:`date_range` where using a negative frequency value would not include all points between the start and end values (:issue:`56147`)
951+
- Bug in :func:`to_datetime` where passing an ``lxml.etree._ElementUnicodeResult`` together with ``format`` raised ``TypeError``. Now subclasses of ``str`` are handled. (:issue:`60933`)
951952
- Bug in :func:`tseries.api.guess_datetime_format` would fail to infer time format when "%Y" == "%H%M" (:issue:`57452`)
952953
- Bug in :func:`tseries.frequencies.to_offset` would fail to parse frequency strings starting with "LWOM" (:issue:`59218`)
953954
- Bug in :meth:`DataFrame.fillna` raising an ``AssertionError`` instead of ``OutOfBoundsDatetime`` when filling a ``datetime64[ns]`` column with an out-of-bounds timestamp. Now correctly raises ``OutOfBoundsDatetime``. (:issue:`61208`)
@@ -971,7 +972,6 @@ Datetimelike
971972
- Bug in constructing arrays with :class:`ArrowDtype` with ``timestamp`` type incorrectly allowing ``Decimal("NaN")`` (:issue:`61773`)
972973
- Bug in constructing arrays with a timezone-aware :class:`ArrowDtype` from timezone-naive datetime objects incorrectly treating those as UTC times instead of wall times like :class:`DatetimeTZDtype` (:issue:`61775`)
973974
- Bug in setting scalar values with mismatched resolution into arrays with non-nanosecond ``datetime64``, ``timedelta64`` or :class:`DatetimeTZDtype` incorrectly truncating those scalars (:issue:`56410`)
974-
- Bug in :func:`to_datetime` where passing an ``lxml.etree._ElementUnicodeResult`` together with ``format`` raised ``TypeError``. Now subclasses of ``str`` are handled. (:issue:`60933`)
975975

976976

977977
Timedelta

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)