diff options
author | idomic <michael.ido@gmail.com> | 2020-03-09 11:57:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-09 11:57:53 (GMT) |
commit | fc72ab6913f2b5337ae7fda711f2de846d38f479 (patch) | |
tree | 2978bd3e0b166854e13690f9acc376d442f0df64 /Lib/test/test_importlib/source | |
parent | e53a3932cb01683b0fa8a7448ca25a2e658c39e6 (diff) | |
download | cpython-fc72ab6913f2b5337ae7fda711f2de846d38f479.zip cpython-fc72ab6913f2b5337ae7fda711f2de846d38f479.tar.gz cpython-fc72ab6913f2b5337ae7fda711f2de846d38f479.tar.bz2 |
bpo-38691: importlib ignores PYTHONCASEOK if -E is used (GH-18627)
The importlib module now ignores the PYTHONCASEOK
environment variable when the -E or -I command line
options are being used.
Diffstat (limited to 'Lib/test/test_importlib/source')
-rw-r--r-- | Lib/test/test_importlib/source/test_case_sensitivity.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/source/test_case_sensitivity.py b/Lib/test/test_importlib/source/test_case_sensitivity.py index 12ce0cb..ad1cfdb 100644 --- a/Lib/test/test_importlib/source/test_case_sensitivity.py +++ b/Lib/test/test_importlib/source/test_case_sensitivity.py @@ -1,4 +1,6 @@ """Test case-sensitivity (PEP 235).""" +import sys + from .. import util importlib = util.import_importlib('importlib') @@ -38,6 +40,7 @@ class CaseSensitivityTest(util.CASEOKTestBase): insensitive_finder = self.finder(insensitive_path) return self.find(sensitive_finder), self.find(insensitive_finder) + @unittest.skipIf(sys.flags.ignore_environment, 'ignore_environment flag was set') def test_sensitive(self): with test_support.EnvironmentVarGuard() as env: env.unset('PYTHONCASEOK') @@ -47,6 +50,7 @@ class CaseSensitivityTest(util.CASEOKTestBase): self.assertIn(self.name, sensitive.get_filename(self.name)) self.assertIsNone(insensitive) + @unittest.skipIf(sys.flags.ignore_environment, 'ignore_environment flag was set') def test_insensitive(self): with test_support.EnvironmentVarGuard() as env: env.set('PYTHONCASEOK', '1') |