@@ -95,8 +95,7 @@ def test_wheel_c_extension(project: str, exptected_c_dir: str) -> None:
95
95
assert re .search (r"\s+extended/extended.*\.(so|pyd)" , record ) is not None
96
96
97
97
# Files in RECORD should match files in wheel.
98
- zip_files = sorted (zipf .namelist ())
99
- assert zip_files == sorted (record_files )
98
+ assert zipf .namelist () == record_files
100
99
assert len (set (record_files )) == len (record_files )
101
100
102
101
@@ -125,17 +124,17 @@ def test_complete(no_vcs: bool) -> None:
125
124
"my_package/sub_pkg1/__init__.py" ,
126
125
"my_package/sub_pkg2/__init__.py" ,
127
126
"my_package/sub_pkg2/data2/data.json" ,
128
- "my_package-1.2.3.data/scripts/script.sh" ,
129
127
"my_package/sub_pkg3/foo.py" ,
128
+ "my_package-1.2.3.data/scripts/script.sh" ,
130
129
"my_package-1.2.3.dist-info/entry_points.txt" ,
131
130
"my_package-1.2.3.dist-info/LICENSE" ,
132
- "my_package-1.2.3.dist-info/WHEEL" ,
133
131
"my_package-1.2.3.dist-info/METADATA" ,
132
+ "my_package-1.2.3.dist-info/WHEEL" ,
134
133
"my_package-1.2.3.dist-info/RECORD" ,
135
134
]
136
135
137
136
with zipfile .ZipFile (str (whl )) as zipf :
138
- assert sorted ( zipf .namelist ()) == sorted ( expected_name_list )
137
+ assert zipf .namelist () == expected_name_list
139
138
assert (
140
139
"Hello World"
141
140
in zipf .read ("my_package-1.2.3.data/scripts/script.sh" ).decode ()
@@ -208,12 +207,11 @@ def test_complete(no_vcs: bool) -> None:
208
207
)
209
208
actual_records = zipf .read ("my_package-1.2.3.dist-info/RECORD" ).decode ()
210
209
211
- # For some reason, the ordering of the files and the SHA hashes
212
- # vary per operating systems and Python versions.
210
+ # The SHA hashes vary per operating systems.
213
211
# So instead of 1:1 assertion, let's do a bit clunkier one:
214
212
actual_files = [row [0 ] for row in csv .reader (actual_records .splitlines ())]
215
213
216
- assert sorted ( actual_files ) == sorted ( expected_name_list )
214
+ assert actual_files == expected_name_list
217
215
218
216
219
217
def test_module_src () -> None :
0 commit comments