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

Remove unused format_tag

Since we delegate tag formatting to packaging.tags.Tag, we don't need
this function or its tests.
This commit is contained in:
Chris Hunt 2019-11-23 18:02:26 -05:00
parent 80b2c82d0c
commit 58f175fdf2
2 changed files with 0 additions and 18 deletions

View file

@ -29,15 +29,6 @@ logger = logging.getLogger(__name__)
_osx_arch_pat = re.compile(r'(.+)_(\d+)_(\d+)_(.+)')
def format_tag(file_tag):
# type: (Tuple[str, ...]) -> str
"""Format three tags in the form "<python_tag>-<abi_tag>-<platform_tag>".
:param file_tag: A 3-tuple of tags (python_tag, abi_tag, platform_tag).
"""
return '-'.join(file_tag)
def get_config_var(var):
# type: (str) -> Optional[str]
return sysconfig.get_config_var(var)

View file

@ -7,15 +7,6 @@ from pip._vendor.packaging.tags import interpreter_name, interpreter_version
from pip._internal import pep425tags
@pytest.mark.parametrize('file_tag, expected', [
(('py27', 'none', 'any'), 'py27-none-any'),
(('cp33', 'cp32dmu', 'linux_x86_64'), 'cp33-cp32dmu-linux_x86_64'),
])
def test_format_tag(file_tag, expected):
actual = pep425tags.format_tag(file_tag)
assert actual == expected
@pytest.mark.parametrize('version_info, expected', [
((2,), '2'),
((2, 8), '28'),