This commit is contained in:
Brett Cannon 2016-07-16 10:45:16 -07:00
commit 4106f61c4c
4 changed files with 28 additions and 22 deletions

View file

@ -377,3 +377,12 @@ def mock_path_hook(*entries, importer):
raise ImportError
return importer
return hook
class CASEOKTestBase:
def caseok_env_changed(self, *, should_exist):
possibilities = b'PYTHONCASEOK', 'PYTHONCASEOK'
if any(x in self.importlib._bootstrap_external._os.environ
for x in possibilities) != should_exist:
self.skipTest('os.environ changes not reflected in _os.environ')