Skip to content

Commit d75856f

Browse files
committed
test_ogr_sxf_3: improve handling of temporary files
1 parent 146b2ed commit d75856f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autotest/ogr/ogr_sxf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ def test_ogr_sxf_2():
7171
# Open SXF datasource with custom RSC file.
7272

7373

74-
def test_ogr_sxf_3():
74+
def test_ogr_sxf_3(tmp_path):
7575

7676
lyr_names = ["SYSTEM", "Not_Classified"]
77-
sxf_name = "tmp/test_ogr_sxf_3.sxf"
78-
rsc_name = "tmp/test_ogr_sxf_3.rsc"
77+
sxf_name = str(tmp_path / "test_ogr_sxf_3.sxf")
78+
rsc_name = str(tmp_path / "test_ogr_sxf_3.rsc")
7979
fake_rsc = open(rsc_name, "w")
8080
fake_rsc.close()
8181
shutil.copy("data/sxf/100_test.sxf", sxf_name)

0 commit comments

Comments
 (0)