Skip to content

Commit 135f2de

Browse files
committed
use tmp_path
1 parent d235341 commit 135f2de

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/tests/io/pytables/test_read.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,12 @@ def test_read_infer_string(tmp_path, setup_path):
319319
tm.assert_frame_equal(result, expected)
320320

321321

322-
def test_hdfstore_read_datetime64_unit_s():
322+
def test_hdfstore_read_datetime64_unit_s(tmp_path, setup_path):
323323
# Fix issue 59004: HDFStore doesn't save datetime64[s] right
324324
df_s = DataFrame(["2001-01-01", "2002-02-02"], dtype="datetime64[s]")
325-
with HDFStore("deleteme.h5", mode="w") as store:
325+
path = tmp_path / setup_path
326+
with HDFStore(path, mode="w") as store:
326327
store.put("df_s", df_s)
327-
with HDFStore("deleteme.h5", mode="r") as store:
328+
with HDFStore(path, mode="r") as store:
328329
df_fromstore = store.get("df_s")
329330
tm.assert_frame_equal(df_s, df_fromstore)
330-
Path("deleteme.h5").unlink() # Delete created file

0 commit comments

Comments
 (0)