1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

verify that hyphens are never allowed in tags

This commit is contained in:
Min RK 2015-06-18 11:52:10 -07:00
parent 26d078c4c2
commit 659d81d880

View file

@ -307,6 +307,27 @@ class TestPEP425Tags(object):
with patch('pip.pep425tags.sysconfig.get_config_var', raises_ioerror):
assert len(pip.pep425tags.get_supported())
def test_no_hyphen_tag(self):
"""
Test that no tag contains a hyphen.
"""
import pip.pep425tags
get_config_var = pip.pep425tags.sysconfig.get_config_var
def mock_soabi(var):
if var == 'SOABI':
return 'cpython-35m-darwin'
return get_config_var(var)
with patch('pip.pep425tags.sysconfig.get_config_var', mock_soabi):
supported = pip.pep425tags.get_supported()
for (py, abi, plat) in supported:
assert '-' not in py
assert '-' not in abi
assert '-' not in plat
class TestMoveWheelFiles(object):
"""