File tree 1 file changed +4
-10
lines changed 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -150,33 +150,27 @@ def test_unpack_wheel_no_flatten(self):
150
150
finally :
151
151
rmtree (tmpdir )
152
152
pass
153
-
153
+
154
154
def test_purelib_platlib (self ):
155
155
"""
156
156
Test the "wheel is purelib/platlib" code.
157
157
"""
158
158
packages = [("pure_wheel" , "data/packages/pure_wheel-1.7" , True ),
159
- ("plat_wheel" , "data/packages/plat_wheel-1.7" , False )]
159
+ ("plat_wheel" , "data/packages/plat_wheel-1.7" , False )]
160
160
for name , path , expected in packages :
161
161
assert wheel .root_is_purelib (name , path ) == expected
162
162
163
163
class TestPEP425Tags (object ):
164
-
164
+
165
165
def test_broken_sysconfig (self ):
166
166
"""
167
167
Test that pep425tags still works when sysconfig is broken.
168
168
Can be a problem on Python 2.7
169
169
Issue #1074.
170
170
"""
171
- import sysconfig
172
171
import pip .pep425tags
173
172
def raises_ioerror (var ):
174
173
raise IOError ("I have the wrong path!" )
175
-
176
- original = sysconfig .get_config_var
177
- sysconfig .get_config_var = raises_ioerror
178
- try :
174
+ with patch ('pip.pep425tags.sysconfig.get_config_var' , raises_ioerror ):
179
175
assert len (pip .pep425tags .get_supported ())
180
- finally :
181
- sysconfig .get_config_var = original
182
176
You can’t perform that action at this time.
0 commit comments