Skip to content

Commit

Permalink
heif: correct autotest temporary path
Browse files Browse the repository at this point in the history
  • Loading branch information
bradh committed May 18, 2024
1 parent c1bf35a commit 2545967
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions autotest/gdrivers/heif.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ def make_data_with_alpha():

@pytest.mark.parametrize("codec", heif_codecs)
def test_heif_create_copy(tmp_path, codec):
tempfile = str(tmp_path / "test_heif_create_copy_" + codec + ".hif")

tempfile = str(tmp_path / ("test_heif_create_copy_" + codec + ".hif"))
input_ds = make_data()

drv = gdal.GetDriverByName("HEIF")
Expand All @@ -253,13 +252,8 @@ def test_heif_create_copy(tmp_path, codec):


@pytest.mark.parametrize("codec", heif_codecs)
def test_heif_create_copy_with_alpha(codec):
tempfile = "tmp/test_heif_create_copy_" + codec + "_alpha.hif"
try:
os.remove(tempfile)
except OSError:
pass

def test_heif_create_copy_with_alpha(tmp_path, codec):
tempfile = str(tmp_path / ("test_heif_create_copy_" + codec + "_alpha.hif"))
input_ds = make_data_with_alpha()

drv = gdal.GetDriverByName("HEIF")
Expand All @@ -272,13 +266,8 @@ def test_heif_create_copy_with_alpha(codec):
assert result_ds


def test_heif_create_copy_defaults():
tempfile = "tmp/test_heif_create_copy.hif"
try:
os.remove(tempfile)
except OSError:
pass

def test_heif_create_copy_defaults(tmp_path):
tempfile = str(tmp_path / "test_heif_create_copy.hif")
input_ds = make_data()

drv = gdal.GetDriverByName("HEIF")
Expand Down

0 comments on commit 2545967

Please sign in to comment.