Skip to content

Commit

Permalink
Merge pull request #8009 from radarhere/zlib-ng
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Apr 24, 2024
2 parents 41270f3 + 4af831e commit 48907a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Tests/test_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def test(name: str, function: Callable[[str], bool]) -> 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:
Expand Down
4 changes: 3 additions & 1 deletion Tests/test_file_png.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ def get_chunks(self, filename: str) -> list[bytes]:

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")

Expand Down

0 comments on commit 48907a6

Please sign in to comment.