Skip to content

Commit 1b6afc8

Browse files
committed
Fix _MISSING_SSL_MESSAGE in test_venv
1 parent 8c3a38d commit 1b6afc8

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/core/IronPython.StdLib/lib/test/test_venv.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818
import unittest
1919
import venv
2020

21-
# pip currently requires ssl support, so we ensure we handle
22-
# it being missing (http://bugs.python.org/issue19744)
23-
try:
24-
import ssl
25-
except ImportError:
26-
ssl = None
27-
2821
skipInVenv = unittest.skipIf(sys.prefix != sys.base_prefix,
2922
'Test not appropriate in a venv')
3023

@@ -307,18 +300,17 @@ def test_explicit_no_pip(self):
307300
self.run_with_capture(venv.create, self.env_dir, with_pip=False)
308301
self.assert_pip_not_installed()
309302

310-
@failsOnWindows
311-
def test_devnull_exists_and_is_empty(self):
303+
def test_devnull(self):
312304
# Fix for issue #20053 uses os.devnull to force a config file to
313305
# appear empty. However http://bugs.python.org/issue20541 means
314306
# that doesn't currently work properly on Windows. Once that is
315307
# fixed, the "win_location" part of test_with_pip should be restored
316-
self.assertTrue(os.path.exists(os.devnull))
317308
with open(os.devnull, "rb") as f:
318309
self.assertEqual(f.read(), b"")
319310

311+
self.assertTrue(os.path.exists(os.devnull))
312+
320313
# Requesting pip fails without SSL (http://bugs.python.org/issue19744)
321-
@unittest.skipIf(ssl is None, ensurepip._MISSING_SSL_MESSAGE)
322314
def test_with_pip(self):
323315
rmtree(self.env_dir)
324316
with EnvironmentVarGuard() as envvars:

0 commit comments

Comments
 (0)