Skip to content

Commit 95a9ffb

Browse files
committed
Fix sha of WHEEL file in test for wheelbuilder
1 parent 7ea5f01 commit 95a9ffb

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

setuptools/tests/test_wheelbuilder.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,19 @@ def test_write_str(tmp_path):
2626
assert infolist[2].filename == "test-1.0.dist-info/WHEEL"
2727
assert infolist[3].filename == "test-1.0.dist-info/RECORD"
2828

29-
record = zf.read("test-1.0.dist-info/RECORD")
29+
record = "\n".join(
30+
line
31+
for line in str(zf.read("test-1.0.dist-info/RECORD"), "utf-8").splitlines()
32+
if not line.startswith("test-1.0.dist-info/WHEEL")
33+
# Avoid changes in setuptools versions messing with the test
34+
)
35+
3036
expected = """\
3137
hello/héllö.py,sha256=bv-QV3RciQC2v3zL8Uvhd_arp40J5A9xmyubN34OVwo,25
3238
"hello/h,ll,.py",sha256=bv-QV3RciQC2v3zL8Uvhd_arp40J5A9xmyubN34OVwo,25
33-
test-1.0.dist-info/WHEEL,sha256=NQO4GQhpskiOxMaJNXoSMmqqiP8mLs4mkxW8zYE9nzo,100
3439
test-1.0.dist-info/RECORD,,
3540
"""
36-
assert str(record, "utf-8") == textwrap.dedent(expected)
41+
assert record.strip() == textwrap.dedent(expected).strip()
3742

3843

3944
def test_timestamp(tmp_path_factory, tmp_path, monkeypatch):

0 commit comments

Comments
 (0)