Skip to content

Commit

Permalink
Only replace version suffix if zlib-ng is present
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere authored and nulano committed Oct 26, 2024
1 parent c07e089 commit ed910a6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Tests/test_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ def test(name: str, function: Callable[[str], str | None]) -> None:
else:
assert function(name) == version
if name != "PIL":
if name == "zlib" and version is not None:
version = re.sub(".zlib-ng$", "", version)
elif name == "libtiff" and version is not None:
version = re.sub("t$", "", version)
if version is not None:
if name == "zlib" and features.check_feature("zlib_ng"):
version = re.sub(".zlib-ng$", "", version)
elif name == "libtiff":
version = re.sub("t$", "", version)
assert version is None or re.search(r"\d+(\.\d+)*$", version)

for module in features.modules:
Expand Down

0 comments on commit ed910a6

Please sign in to comment.