a :êdg ã@s’ddlZddlZddlZddlmZddlmZddlmZej dkrJdndZ e  e due ¡Gdd„dej ej ƒƒZd d „Zed krŽeeƒƒdS) éN)ÚDistutilsPlatformError)Úsupport)Ú run_unittestÚwin32zThese tests are only for win32c@s,eZdZdd„Zdd„Zdd„Zdd„Zd S) ÚmsvccompilerTestCasecCsHddlm}dd„}|j}||_z| t|jd¡W||_n||_0dS)NrcSsdS)N)NN©)Z plat_specrrú=/usr/local/lib/python3.9/distutils/tests/test_msvccompiler.pyÚ_find_vcvarsallsz>msvccompilerTestCase.test_no_compiler.._find_vcvarsallzwont find this version)Údistutils._msvccompilerÚ _msvccompilerr Z assertRaisesrÚ _get_vc_env)Úselfr r Zold_find_vcvarsallrrrÚtest_no_compilers þz%msvccompilerTestCase.test_no_compilerc Csšddlm}d}d}tj dd¡}|tj|<zL| d¡}| | ¡|¡| ||| ¡¡Wtj |¡|r–|tjd<ntj |¡|r”|tjd<0dS)NruṰḖṤṪ┅ṼẨṜu ₃â´â‚…ZDISTUTILS_USE_SDKZx86) r r ÚosÚenvironÚpopr ZassertInÚlowerZ assertEqual)r r Ztest_varZ test_valueZold_distutils_use_sdkÚenvrrrÚtest_get_vc_env_unicode#s     þ z,msvccompilerTestCase.test_get_vc_env_unicodecCsJddlm}| ¡\}}|r<| |d¡| tj |¡¡n t  d¡‚dS)NrézVS 2017 is not installed) r r Z _find_vc2017ÚassertGreaterEqualÚ assertTruerÚpathÚisdirÚunittestÚSkipTest©r r ÚversionrrrrÚtest_get_vc20175s    z$msvccompilerTestCase.test_get_vc2017cCsJddlm}| ¡\}}|r<| |d¡| tj |¡¡n t  d¡‚dS)NrézVS 2015 is not installed) r r Z _find_vc2015rrrrrrrrrrrÚtest_get_vc2015As    z$msvccompilerTestCase.test_get_vc2015N)Ú__name__Ú __module__Ú __qualname__rrrr rrrrrs rcCs t t¡S)N)rZ makeSuiterrrrrÚ test_suiteMsr$Ú__main__)ÚsysrrZdistutils.errorsrZdistutils.testsrZ test.supportrÚplatformZ SKIP_MESSAGEZ skipUnlessZTempdirManagerZTestCaserr$r!rrrrÚs   ÿÿ>