Skip to content

Commit

Permalink
Fix sha of WHEEL file in test for wheelbuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed May 3, 2023
1 parent b538464 commit 3764271
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions setuptools/tests/test_wheelbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,19 @@ def test_write_str(tmp_path):
assert infolist[2].filename == "test-1.0.dist-info/WHEEL"
assert infolist[3].filename == "test-1.0.dist-info/RECORD"

record = zf.read("test-1.0.dist-info/RECORD")
record = "\n".join(
line
for line in str(zf.read("test-1.0.dist-info/RECORD"), "utf-8").splitlines()
if not line.startswith("test-1.0.dist-info/WHEEL")
# Avoid changes in setuptools versions messing with the test
)

expected = """\
hello/héllö.py,sha256=bv-QV3RciQC2v3zL8Uvhd_arp40J5A9xmyubN34OVwo,25
"hello/h,ll,.py",sha256=bv-QV3RciQC2v3zL8Uvhd_arp40J5A9xmyubN34OVwo,25
test-1.0.dist-info/WHEEL,sha256=NQO4GQhpskiOxMaJNXoSMmqqiP8mLs4mkxW8zYE9nzo,100
test-1.0.dist-info/RECORD,,
"""
assert str(record, "utf-8") == textwrap.dedent(expected)
assert record.strip() == textwrap.dedent(expected).strip()


def test_timestamp(tmp_path_factory, tmp_path, monkeypatch):
Expand Down

0 comments on commit 3764271

Please sign in to comment.