summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib/extension
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2016-07-16 17:45:16 (GMT)
committerBrett Cannon <brett@python.org>2016-07-16 17:45:16 (GMT)
commit4106f61c4c60a0d981b16aca08daa89cdd07a29b (patch)
treefd542246d2e8c18e58f552792df7e36a1ef6a7ae /Lib/test/test_importlib/extension
parentd2fe862baba9e98ec19d00184c1405ddc978f924 (diff)
parent7ca63cb7cc0ea962f40559ba57f767e38d7f1af7 (diff)
downloadcpython-4106f61c4c60a0d981b16aca08daa89cdd07a29b.zip
cpython-4106f61c4c60a0d981b16aca08daa89cdd07a29b.tar.gz
cpython-4106f61c4c60a0d981b16aca08daa89cdd07a29b.tar.bz2
Merge for #27083
Diffstat (limited to 'Lib/test/test_importlib/extension')
-rw-r--r--Lib/test/test_importlib/extension/test_case_sensitivity.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/Lib/test/test_importlib/extension/test_case_sensitivity.py b/Lib/test/test_importlib/extension/test_case_sensitivity.py
index b74e900..0dd9c86 100644
--- a/Lib/test/test_importlib/extension/test_case_sensitivity.py
+++ b/Lib/test/test_importlib/extension/test_case_sensitivity.py
@@ -4,12 +4,13 @@ import unittest
from .. import util
+importlib = util.import_importlib('importlib')
machinery = util.import_importlib('importlib.machinery')
@unittest.skipIf(util.EXTENSIONS.filename is None, '_testcapi not available')
@util.case_insensitive_tests
-class ExtensionModuleCaseSensitivityTest:
+class ExtensionModuleCaseSensitivityTest(util.CASEOKTestBase):
def find_module(self):
good_name = util.EXTENSIONS.name
@@ -23,25 +24,22 @@ class ExtensionModuleCaseSensitivityTest:
def test_case_sensitive(self):
with support.EnvironmentVarGuard() as env:
env.unset('PYTHONCASEOK')
- if b'PYTHONCASEOK' in _bootstrap_external._os.environ:
- self.skipTest('os.environ changes not reflected in '
- '_os.environ')
+ self.caseok_env_changed(should_exist=False)
loader = self.find_module()
self.assertIsNone(loader)
def test_case_insensitivity(self):
with support.EnvironmentVarGuard() as env:
env.set('PYTHONCASEOK', '1')
- if b'PYTHONCASEOK' not in _bootstrap_external._os.environ:
- self.skipTest('os.environ changes not reflected in '
- '_os.environ')
+ self.caseok_env_changed(should_exist=True)
loader = self.find_module()
self.assertTrue(hasattr(loader, 'load_module'))
(Frozen_ExtensionCaseSensitivity,
Source_ExtensionCaseSensitivity
- ) = util.test_both(ExtensionModuleCaseSensitivityTest, machinery=machinery)
+ ) = util.test_both(ExtensionModuleCaseSensitivityTest, importlib=importlib,
+ machinery=machinery)
if __name__ == '__main__':