
    e
                         d Z ddlZddlZddlZddlmZ ddlmZ ej        dk    rdndZ	 ej
        e	du e	           G d dej        ej                              Zed	k    r ej                     dS dS )
z"Tests for distutils._msvccompiler.    N)DistutilsPlatformError)supportwin32zThese tests are only for win32c                   &    e Zd Zd Zd Zd Zd ZdS )msvccompilerTestCasec                     dd l m} d }|j        }||_        	 |                     t          |j        d           ||_        d S # ||_        w xY w)Nr   c                     dS )N)NN )	plat_specs    3  /home/conda/feedstock_root/build_artifacts/python-split_1708115622739/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.11/distutils/tests/test_msvccompiler.py_find_vcvarsallz>msvccompilerTestCase.test_no_compiler.<locals>._find_vcvarsall   s    :    zwont find this version)distutils._msvccompiler_msvccompilerr   assertRaisesr   _get_vc_env)selfr   r   old_find_vcvarsalls       r   test_no_compilerz%msvccompilerTestCase.test_no_compiler   s    777777	 	 	 +:(7%	?4+757 7 7 -?M))),>M)>>>>s   !A 	Ac                    dd l m} d}d}t          j                            dd           }|t          j        |<   	 |                    d          }|                     |                                |           |                     |||                                                    t          j                            |           |r|t          j        d<   d S d S # t          j                            |           |r|t          j        d<   w xY w)Nr   u   ṰḖṤṪ┅ṼẨṜu	   ₃⁴₅DISTUTILS_USE_SDKx86)	r   r   osenvironpopr   assertInlowerassertEqual)r   r   test_var
test_valueold_distutils_use_sdkenvs         r   test_get_vc_env_unicodez,msvccompilerTestCase.test_get_vc_env_unicode"   s   777777- 
 !#
/BD I I)
8	H++E22CMM(..**C000ZX^^-=-=)>???JNN8$$$$ H2G
.///H H JNN8$$$$ H2G
./GGGGs   A+C 2Dc                     dd l m} |                                \  }}|rJ|                     |d           |                     t
          j                            |                     d S t          j	        d          )Nr      zVS 2017 is not installed)
r   r   _find_vc2017assertGreaterEqual
assertTruer   pathisdirunittestSkipTestr   r   versionr)   s       r   test_get_vc2017z$msvccompilerTestCase.test_get_vc20174       777777 &2244 	@##GR000OOBGMM$//00000#$>???r   c                     dd l m} |                                \  }}|rJ|                     |d           |                     t
          j                            |                     d S t          j	        d          )Nr      zVS 2015 is not installed)
r   r   _find_vc2015r'   r(   r   r)   r*   r+   r,   r-   s       r   test_get_vc2015z$msvccompilerTestCase.test_get_vc2015@   r0   r   N)__name__
__module____qualname__r   r#   r/   r4   r
   r   r   r   r      s[        ? ? ?"H H H$
@ 
@ 
@
@ 
@ 
@ 
@ 
@r   r   __main__)__doc__sysr+   r   distutils.errorsr   distutils.testsr   platformSKIP_MESSAGE
skipUnlessTempdirManagerTestCaser   r5   mainr
   r   r   <module>rC      s    ( ( 



  				 3 3 3 3 3 3 # # # # # # //0  \T)<88<@ <@ <@ <@ <@71$-<@ <@ 98<@| zHMOOOOO r   