Skip to content

Commit 4449a77

Browse files
committed
TST: Replace ensure_clean with temp_file in test_errors.py
1 parent db31f6a commit 4449a77

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/tests/io/pytables/test_errors.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,16 @@ def test_append_with_diff_col_name_types_raises_value_error(setup_path):
182182
store.append(name, d)
183183

184184

185-
def test_invalid_complib(setup_path):
185+
def test_invalid_complib(tmp_path, setup_path):
186186
df = DataFrame(
187187
np.random.default_rng(2).random((4, 5)),
188188
index=list("abcd"),
189189
columns=list("ABCDE"),
190190
)
191-
with tm.ensure_clean(setup_path) as path:
192-
msg = r"complib only supports \[.*\] compression."
193-
with pytest.raises(ValueError, match=msg):
194-
df.to_hdf(path, key="df", complib="foolib")
191+
path = tmp_path / setup_path
192+
msg = r"complib only supports \[.*\] compression."
193+
with pytest.raises(ValueError, match=msg):
194+
df.to_hdf(path, key="df", complib="foolib")
195195

196196

197197
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)