diff options
author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2023-03-24 18:56:35 +0000 |
---|---|---|
committer | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2023-05-03 14:10:22 +0100 |
commit | 376427184e4c06341f6a43ad1c478262d6d2e297 (patch) | |
tree | 3db3235366a7b14bb51f4f6eb8c9520fc5aa8355 | |
parent | b538464546150019fb01d8ed4a194bf4f6e56fcc (diff) | |
download | python-setuptools-git-376427184e4c06341f6a43ad1c478262d6d2e297.tar.gz |
Fix sha of WHEEL file in test for wheelbuilder
-rw-r--r-- | setuptools/tests/test_wheelbuilder.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/setuptools/tests/test_wheelbuilder.py b/setuptools/tests/test_wheelbuilder.py index 47238061..94193c91 100644 --- a/setuptools/tests/test_wheelbuilder.py +++ b/setuptools/tests/test_wheelbuilder.py @@ -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): |