Skip to content

Commit f7f4d56

Browse files
authored
TST: Replace ensure_clean with temp_file in test_pytables_missing.py (#62613)
1 parent cbda666 commit f7f4d56

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pandas/tests/io/pytables/test_pytables_missing.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
import pandas.util._test_decorators as td
44

55
import pandas as pd
6-
import pandas._testing as tm
76

87

98
@td.skip_if_installed("tables")
10-
def test_pytables_raises():
9+
def test_pytables_raises(tmp_path):
1110
df = pd.DataFrame({"A": [1, 2]})
11+
path = tmp_path / "foo.h5"
1212
with pytest.raises(ImportError, match="tables"):
13-
with tm.ensure_clean("foo.h5") as path:
14-
df.to_hdf(path, key="df")
13+
df.to_hdf(path, key="df")

0 commit comments

Comments
 (0)