|
1 |
| -import sys |
2 |
| - |
3 | 1 | import pytest
|
4 | 2 | from mock import patch
|
5 |
| -from pip._vendor.packaging.tags import interpreter_name |
6 | 3 |
|
7 | 4 | from pip._internal import pep425tags
|
8 | 5 |
|
@@ -38,45 +35,6 @@ def _mock_get_config_var(var):
|
38 | 35 | return get_config_var(var)
|
39 | 36 | return _mock_get_config_var
|
40 | 37 |
|
41 |
| - def abi_tag_unicode(self, flags, config_vars): |
42 |
| - """ |
43 |
| - Used to test ABI tags, verify correct use of the `u` flag |
44 |
| - """ |
45 |
| - import pip._internal.pep425tags |
46 |
| - |
47 |
| - config_vars.update({'SOABI': None}) |
48 |
| - base = interpreter_name() + pip._internal.pep425tags.get_impl_ver() |
49 |
| - |
50 |
| - if sys.version_info >= (3, 8): |
51 |
| - # Python 3.8 removes the m flag, so don't look for it. |
52 |
| - flags = flags.replace('m', '') |
53 |
| - |
54 |
| - if sys.version_info < (3, 3): |
55 |
| - config_vars.update({'Py_UNICODE_SIZE': 2}) |
56 |
| - mock_gcf = self.mock_get_config_var(**config_vars) |
57 |
| - with patch('pip._internal.pep425tags.sysconfig.get_config_var', |
58 |
| - mock_gcf): |
59 |
| - abi_tag = pip._internal.pep425tags.get_abi_tag() |
60 |
| - assert abi_tag == base + flags |
61 |
| - |
62 |
| - config_vars.update({'Py_UNICODE_SIZE': 4}) |
63 |
| - mock_gcf = self.mock_get_config_var(**config_vars) |
64 |
| - with patch('pip._internal.pep425tags.sysconfig.get_config_var', |
65 |
| - mock_gcf): |
66 |
| - abi_tag = pip._internal.pep425tags.get_abi_tag() |
67 |
| - assert abi_tag == base + flags + 'u' |
68 |
| - |
69 |
| - else: |
70 |
| - # On Python >= 3.3, UCS-4 is essentially permanently enabled, and |
71 |
| - # Py_UNICODE_SIZE is None. SOABI on these builds does not include |
72 |
| - # the 'u' so manual SOABI detection should not do so either. |
73 |
| - config_vars.update({'Py_UNICODE_SIZE': None}) |
74 |
| - mock_gcf = self.mock_get_config_var(**config_vars) |
75 |
| - with patch('pip._internal.pep425tags.sysconfig.get_config_var', |
76 |
| - mock_gcf): |
77 |
| - abi_tag = pip._internal.pep425tags.get_abi_tag() |
78 |
| - assert abi_tag == base + flags |
79 |
| - |
80 | 38 | @pytest.mark.xfail(
|
81 | 39 | strict=True, reason="packaging.tags does not guard against this error"
|
82 | 40 | )
|
@@ -112,30 +70,6 @@ def test_no_hyphen_tag(self):
|
112 | 70 | assert '-' not in tag.abi
|
113 | 71 | assert '-' not in tag.platform
|
114 | 72 |
|
115 |
| - def test_manual_abi_noflags(self): |
116 |
| - """ |
117 |
| - Test that no flags are set on a non-PyDebug, non-Pymalloc ABI tag. |
118 |
| - """ |
119 |
| - self.abi_tag_unicode('', {'Py_DEBUG': False, 'WITH_PYMALLOC': False}) |
120 |
| - |
121 |
| - def test_manual_abi_d_flag(self): |
122 |
| - """ |
123 |
| - Test that the `d` flag is set on a PyDebug, non-Pymalloc ABI tag. |
124 |
| - """ |
125 |
| - self.abi_tag_unicode('d', {'Py_DEBUG': True, 'WITH_PYMALLOC': False}) |
126 |
| - |
127 |
| - def test_manual_abi_m_flag(self): |
128 |
| - """ |
129 |
| - Test that the `m` flag is set on a non-PyDebug, Pymalloc ABI tag. |
130 |
| - """ |
131 |
| - self.abi_tag_unicode('m', {'Py_DEBUG': False, 'WITH_PYMALLOC': True}) |
132 |
| - |
133 |
| - def test_manual_abi_dm_flags(self): |
134 |
| - """ |
135 |
| - Test that the `dm` flags are set on a PyDebug, Pymalloc ABI tag. |
136 |
| - """ |
137 |
| - self.abi_tag_unicode('dm', {'Py_DEBUG': True, 'WITH_PYMALLOC': True}) |
138 |
| - |
139 | 73 |
|
140 | 74 | class TestManylinux2010Tags(object):
|
141 | 75 |
|
|
0 commit comments