Skip to content

Commit aaa4c1c

Browse files
committed
replaced ensure_clean with pytest fixture in test_sas.py
1 parent 10102e6 commit aaa4c1c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/tests/io/sas/test_sas.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from pandas import read_sas
66
import pandas._testing as tm
7+
from pandas.conftest import temp_file
78

89

910
class TestSas:
@@ -18,12 +19,11 @@ def test_sas_buffer_format(self):
1819
with pytest.raises(ValueError, match=msg):
1920
read_sas(b)
2021

21-
def test_sas_read_no_format_or_extension(self):
22+
def test_sas_read_no_format_or_extension(self,temp_file):
2223
# see gh-24548
2324
msg = "unable to infer format of SAS file.+"
24-
with tm.ensure_clean("test_file_no_extension") as path:
25-
with pytest.raises(ValueError, match=msg):
26-
read_sas(path)
25+
with pytest.raises(ValueError, match=msg):
26+
read_sas(temp_file)
2727

2828

2929
def test_sas_archive(datapath):

0 commit comments

Comments
 (0)