Accept '.zlib-ng' suffix to zlib version

This commit is contained in:
Andrew Murray 2024-04-24 23:45:25 +10:00
parent 41270f300f
commit 4af831e70c
2 changed files with 5 additions and 1 deletions

View File

@ -37,6 +37,8 @@ def test_version() -> None:
else:
assert function(name) == version
if name != "PIL":
if name == "zlib" and version is not None:
version = version.replace(".zlib-ng", "")
assert version is None or re.search(r"\d+(\.\d+)*$", version)
for module in features.modules:

View File

@ -85,7 +85,9 @@ class TestFilePng:
def test_sanity(self, tmp_path: Path) -> None:
# internal version number
assert re.search(r"\d+(\.\d+){1,3}$", features.version_codec("zlib"))
assert re.search(
r"\d+(\.\d+){1,3}(\.zlib\-ng)?$", features.version_codec("zlib")
)
test_file = str(tmp_path / "temp.png")