File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -153,14 +153,15 @@ def pip_cert(tmp_path_factory):
153
153
# workaround for https://github.com/pypa/pip/issues/8984 - if the certificate is explicitly set no error can happen
154
154
key = ensure_str ("PIP_CERT" )
155
155
if key in os .environ :
156
- return
157
- cert = tmp_path_factory .mktemp ("folder" ) / "cert"
158
- import pkgutil
159
-
160
- cert_data = pkgutil .get_data ("pip._vendor.certifi" , "cacert.pem" )
161
- cert .write_bytes (cert_data )
162
- with change_os_environ (key , str (cert )):
163
156
yield
157
+ else :
158
+ cert = tmp_path_factory .mktemp ("folder" ) / "cert"
159
+ import pkgutil
160
+
161
+ cert_data = pkgutil .get_data ("pip._vendor.certifi" , "cacert.pem" )
162
+ cert .write_bytes (cert_data )
163
+ with change_os_environ (key , str (cert )):
164
+ yield
164
165
165
166
166
167
@pytest .fixture (autouse = True )
You can’t perform that action at this time.
0 commit comments