tests/test-demandimport.py
changeset 51740 be227c60a3e0
parent 50925 d718eddf01d9
child 52009 5713adc51f2a
equal deleted inserted replaced
51739:55677d115045 51740:be227c60a3e0
    28 
    28 
    29 try:
    29 try:
    30     from importlib.util import _Module as moduletype
    30     from importlib.util import _Module as moduletype
    31 except ImportError:
    31 except ImportError:
    32     moduletype = types.ModuleType
    32     moduletype = types.ModuleType
    33 
       
    34 if os.name != 'nt':
       
    35     try:
       
    36         import distutils.msvc9compiler
       
    37 
       
    38         print(
       
    39             'distutils.msvc9compiler needs to be an immediate '
       
    40             'importerror on non-windows platforms'
       
    41         )
       
    42         distutils.msvc9compiler
       
    43     except ImportError:
       
    44         pass
       
    45 
    33 
    46 import re
    34 import re
    47 
    35 
    48 rsub = re.sub
    36 rsub = re.sub
    49 
    37