<s> import imp <EOL> import sys <EOL> from test import support <EOL> import unittest <EOL> from importlib import _bootstrap <EOL> from . . import util <EOL> from . import util as ext_util <EOL> @ util . case_insensitive_tests <EOL> class ExtensionModuleCaseSensitivityTest ( unittest . TestCase ) : <EOL> def find_module ( self ) : <EOL> good_name = ext_util . NAME <EOL> bad_name = good_name . upper ( ) <EOL> assert good_name != bad_name <EOL> finder = _bootstrap . FileFinder ( ext_util . PATH , <EOL> ( _bootstrap . ExtensionFileLoader , <EOL> _bootstrap . EXTENSION_SUFFIXES ) ) <EOL> return finder . find_module ( bad_name ) <EOL> def test_case_sensitive ( self ) : <EOL> with support . EnvironmentVarGuard ( ) as env : <EOL> env . unset ( '<STR_LIT>' ) <EOL> if b'<STR_LIT>' in _bootstrap . _os . environ : <EOL> self . skipTest ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> loader = self . find_module ( ) <EOL> self . assertIsNone ( loader ) <EOL> def test_case_insensitivity ( self ) : <EOL> with support . EnvironmentVarGuard ( ) as env : <EOL> env . set ( '<STR_LIT>' , '<STR_LIT:1>' ) <EOL> if b'<STR_LIT>' not in _bootstrap . _os . environ : <EOL> self . skipTest ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> loader = self . find_module ( ) <EOL> self . assertTrue ( hasattr ( loader , '<STR_LIT>' ) ) <EOL> def test_main ( ) : <EOL> if ext_util . FILENAME is None : <EOL> return <EOL> support . run_unittest ( ExtensionModuleCaseSensitivityTest ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> test_main ( ) </s>
