Skip to content

Commit 44ac762

Browse files
committed
fixing tests to pass even when build was with unsupported rav1e AVIF encoder
1 parent 0529bdd commit 44ac762

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tests/helpers.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
add_thumbnails,
1414
have_decoder_for_format,
1515
have_encoder_for_format,
16+
libheif_info,
1617
)
1718

1819
try:
@@ -227,10 +228,14 @@ def hevc_enc() -> bool:
227228
def aom_dec() -> bool:
228229
if getenv("PH_TESTS_NO_AVIF_DEC", "0") != "0":
229230
return False
231+
if libheif_info()["version"]["aom"] == "Rav1e encoder":
232+
return False
230233
return have_decoder_for_format(HeifCompressionFormat.AV1)
231234

232235

233236
def aom_enc() -> bool:
234237
if getenv("PH_TESTS_NO_AVIF_ENC", "0") != "0":
235238
return False
239+
if libheif_info()["version"]["aom"] == "Rav1e encoder":
240+
return False
236241
return have_encoder_for_format(HeifCompressionFormat.AV1)

tests/leaks_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
pytest.importorskip("pympler", reason="`pympler` not installed")
1515
pytest.importorskip("numpy", reason="`numpy` not installed")
1616

17-
print(pillow_heif.libheif_info())
18-
1917
chdir(path.join(path.dirname(path.dirname(path.abspath(__file__))), "tests"))
2018
pillow_heif.register_heif_opener()
2119

0 commit comments

Comments
 (0)