@@ -131,6 +131,23 @@ def test_sdist_from_filename_invalid(filename: str, error_message: str) -> None:
131131 (1000 , "abc" ),
132132 {Tag ("py3" , "none" , "any" )},
133133 ),
134+ (
135+ "foo-1.0-py2.py3-none-any.whl" , # Sorted multiple interpreter tags
136+ "foo" ,
137+ Version ("1.0" ),
138+ (),
139+ {Tag ("py2" , "none" , "any" ), Tag ("py3" , "none" , "any" )},
140+ ),
141+ ( # Sorted multiple platform tags
142+ "numpy-1.23.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl" ,
143+ "numpy" ,
144+ Version ("1.23.3" ),
145+ (),
146+ {
147+ Tag ("cp310" , "cp310" , "manylinux2014_x86_64" ),
148+ Tag ("cp310" , "cp310" , "manylinux_2_17_x86_64" ),
149+ },
150+ ),
134151 ],
135152)
136153def test_wheel_from_filename (
@@ -183,6 +200,16 @@ def test_wheel_from_filename(
183200 "foo-01.0-py3-none-any.whl" , # Non-normalized version
184201 "Invalid wheel filename (non-normalized version '01.0')" ,
185202 ),
203+ ( # Unsorted interpreter tags (py3 before py2)
204+ "foo-1.0-py3.py2-none-any.whl" ,
205+ "Invalid wheel filename (non-normalized tags 'py3.py2-none-any')" ,
206+ ),
207+ (
208+ # Unsorted platform tags (manylinux_ before manylinux2014)
209+ "numpy-1.23.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" ,
210+ "Invalid wheel filename (non-normalized tags "
211+ "'cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64')" ,
212+ ),
186213 ],
187214)
188215def test_wheel_from_filename_invalid (filename : str , error_message : str ) -> None :
0 commit comments