DSrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK r SSK r SSK r SSK r SSK r SSKJrJrJrJrJrJrJrJrJrJrJrJrJr SSKJrJrJrJ r J!r! SSK"J#r# SSK$r$SSK%r%SSK&J'r'J(r( SSK)r)\$RV"\ RX\ RZ:H=(d \ R\\ R^:gS5r0\(d\(d\(d\(a\$Rb"S5e\"5SS j5r2"S S \$Rf\#5r4"S S \45r5\0"SS\455r6\7S:Xa\$Rp"5 gg!\*a Sr)Nf=f)z| Test harness for the venv module. Copyright (C) 2011-2012 Vinay Sajip. Licensed to the PSF under a contributor agreement. N) captured_stdoutcaptured_stderr*skip_if_broken_multiprocessing_synchronizeverboserequires_subprocess is_androidis_apple_mobile is_emscriptenis_wasirequires_venv_with_pip TEST_HOME_DIRrequires_resourcecopy_python_src_ignore) can_symlinkEnvironmentVarGuardrmtreeTESTFNFakePath)ExtraAssertions)patchMockz:cannot run venv.create from within a venv on this platformz&venv is not available on this platformc[R"U[R[R0[RESS0ES9nUR 5up4UR (aX[(a+U(a$[URU=(d SS55 [R"UR XU5eU(a$URUS5URUS54$X44$)N PYTHONHOME)stdoutstderrenvutf-8backslashreplace) subprocessPopenPIPEosenviron communicate returncoderprintdecodeCalledProcessError)cmdencodingpouterrs 5/opt/alt/python313/lib64/python3.13/test/test_venv.py check_outputr01s ,rzz ,< , .A}}HC|| 7s #**X02DE F++ LL#C) ) JJx!3 4 JJx!3 4   8OcP\rSrSrSrSrSrSrSS.SjrS r S r S S .S jr Sr g)BaseTestDzBase class for venv tests.icd[RR[R"55Ul[R S:XaSUlSUlSUl O-SUlSS[R"534UlSUl [Rn[RRU5S Ul[R S :XaP[RR#U5(a,[RR%U5(dS UlgS Ulg) NntScriptsLibIncludebinlibpythonincludewin32TF)r#pathrealpathtempfilemkdtempenv_dirnamebindirr<r> sysconfig_get_python_version_abisys_base_executablesplitexeplatformlexistsexistscannot_link_exe)self executables r/setUpBaseTest.setUpHsww''(8(8(:; 77d?#DKDH$DLDK (I(I(K'LMNDH$DL)) 77==,R0 LLG # ++GGNN:..#'D #(D r1c.[UR5 gN)rrErRs r/tearDownBaseTest.tearDown[st||r1F real_env_dircU(a*[RRUR5nO URn[RR X R UR 5$rW)r#rArBrEjoinrGrM)rRr\rEs r/envpyBaseTest.envpy^sC gg&&t||4GllGww||G[[$((;;r1c[5n[5nU"U0UD6 SSS5 SSS5 WR5WR54$!,(df  N6=f!,(df  N?=frW)rrgetvalue)rRfuncargskwargsoutputerrors r/run_with_captureBaseTest.run_with_captureesV  & "ed%f%# %.."222#" s! A  AA  A A  A.cX[RR"UR/UQ76$rW)r#rAr^rErRrds r/ get_env_fileBaseTest.get_env_fileksww||DLL0400r1rr+c[UR"U6SUS9nUR5nSSS5 U$!,(df  W$=f)Nrrn)openrlread)rRr+rdfresults r/get_text_file_contentsBaseTest.get_text_file_contentsns@ $##T*C( CqVVXFD D C s 4 A)rGrQrErMr>r<N) __name__ __module__ __qualname____firstlineno____doc__maxDiffrTrYr_rhrlru__static_attributes__r1r/r3r3Ds7$G)&%*<3 16=r1r3c :\rSrSrSrSrSrSrSrSr Sr S r \ S 5r \ S 5r\ \R "\"5S 5S 55r\R(S:XaSrO,SSSSS\R,SS-4SS\R,SS-S44rSrSrSrSrSrSr\R "\"5S 5S5r\ S5r\R "\"5S 5S 5r\R@"\!RDS!:HS"5S#5r#\R@"\!RDS!:HS"5S$5r$\R "\!RDS!:HS%5S&5r%\R "\!RDS!:HS%5S'5r&\R "\!RDS!:H=(a \"5S(5S)5r'\ S*5r(\ S+5r)\R@"\!RDS!:HS,5S-5r*\R "\R(S.:HS/5S05r+S1r,\R@"\!RDS!:HS,5\ S255r-\ S35r.\ S45r/\ S55r0\ S65r1\ S75r2\ S85r3S9r4\ \R "\!RDS!:HS%5S:55r5S;r6g)< BasicTestszTest venv module functionality.c~UR"U6nUR[RR U55 grW)rl assertTruer#rAisdir)rRrdfns r/rBasicTest.isdirvs+    %  b)*r1c[UR5 UR[RUR5 UR 5 g)zA Test the create function with default arguments and a str path. N)rrErhvenvcreate_check_output_of_default_createrXs r/test_defaults_with_str_path%BasicTest.test_defaults_with_str_pathzs4 t|| dkk4<<8 ,,.r1c[UR5 UR[R[ UR55 UR 5 g)zG Test the create function with default arguments and a path-like path. N)rrErhrrrrrXs r/test_defaults_with_pathlike%BasicTest.test_defaults_with_pathlikes9 t|| dkk8DLL+AB ,,.r1cvURUR5 URUR5 UR"UR6 UR S5n[ R "S5S:H=(a- [RS:H=(a [RS:gnU(a/UR[RRU55 O.UR[RRU55 UR!S5n[R"n[RR%U5nUR'SU-U5 UR'S[RR)[R*5-U5 [RS :XaS OS nS [R*S USUR,3nUR'Xs5 UR URUR.5n[RRU5(dKUR UR5n [1SU -5 [1S[R2"U 5-5 UR[RRU5SU-5 g)Nlib64Pposixdarwin pyvenv.cfgz home = %szexecutable = %sr6rz --copiesz command = z -m venvz* --without-pip --without-scm-ignore-files Contents of %r: %rFile %r should exist.)rrGr>r<rlstructcalcsizer#rFrJrNrrAislink assertFalserPrurKdirnameassertInrBrSrErMr'listdir) rRr, conditionsdatarSrAcopiesr*rbds r/r)BasicTest._check_output_of_default_creates 4;; 4<<  DHH   g &s+q01rww'7I1||x/   OOBGGNN1- .   RWW^^A. /**<8)) wwz* kD($/ 'gg&&s~~678< >ww}+CNN+8F8<--1\\N< c   t{{DHH 5ww~~b!!""4;;/B #b( ) (RZZ^+ , r*,Cb,HIr1c SSSSSSSSS S [54/ nUGHup#nURX#US 9 [UR5 U(d0nOX40n[R "S0UD6n[ 5Ul[ 5UlURURUR5 URS 5nU(aURS 5(aSHnURUSU35 M O0[RS:XaUS:XaOUR!USU35 SSS5 GM g!,(df  GM/=f)N)NNN)z--copiessymlinksF) --without-pipwith_pipF)--system-site-packagessystem_site_packagesT)--clearclearT) --upgradeupgradeT)--upgrade-deps upgrade_depsT)z--prompt="foobar"promptfoobar--without-scm-ignore-filesscm_ignore_files)optattrvaluergit)rrrrz--promptz command = .* r6rr~) frozensetsubTestrrEr EnvBuilderrupgrade_dependencies _setup_piprhrruendswithassertNotRegexr#rF assertRegex)rRoptionsrrrrebrs r/test_config_file_command_key&BasicTest.test_config_file_command_keys'  + 0 D & * 4 5 )+=y{ K  !( Cu#>t||$F"]FOO-f-)-&#v %%ahh =22<@s||E22 >++D]3%2HI >WWd]tZ'7$$TmC5+AB%?>!(>>s C:D88 E c[RRUR5Sn[ UR5 [ R "5nURURUR5 URUR5nURS5nURURU5 URSU5 [ UR5 [ R "SS9nURURUR5 URUR5nURS5nURURS5 URSU5 [ UR5 [ R "SS9n[RR[R "55nURURUR5 URUR5nURS5nURURU5 URSU-U5 g) Nrz prompt = z My prompt)rzprompt = 'My prompt' .zprompt = '%s' )r#rArLrErrrrhrensure_directoriesru assertEqualr assertNotInrbasenamegetcwd)rRenv_namebuildercontextrcwds r/ test_promptBasicTest.test_prompts77==.q1t||//# gnndll;,,T\\:**<8 2 d+t||//5 gnndll;,,T\\:**<8 5 .5t||//-ggryy{+ gnndll;,,T\\:**<8 - '#-t4r1c^^[R"5nSn[RR [ R 5Sn[ RS:XaZSn[RR[RRU5S5RS5(aSnOSn[R"5n[RR[RRXBU55m[ RS:Xa<[RR[RRT55mUU4S jnURU5n[!S U5 UR#U5 SSS5 SSS5 g!,(df  N=f!,(df  g=f) Nr;rr@r7r_dz python_d.exez python.exec >[RRUS5US'TRUTSSSSS/5 g)Nr-mpipinstallr)r#rAnormcaser)r*re expect_exerRs r/pip_cmd_checker.pip_cmd_checkersG))#a&1A  "!#  r1zvenv.subprocess.check_output)rrr#rArLrJrSrNrsplitextrrCTemporaryDirectoryr^rBrrr)rRrbin_path python_exe fake_env_dirr fake_contextrs` @r/test_upgrade_dependencies#BasicTest.test_upgrade_dependenciess4//#WW]]3>>215 <<7 " Hww 0 0 .>z.JK  #55lCL5G,,\:H-+ *,HG-+ *s% B2F3?F"F3" F0 ,F33 Gc[UR5 UR[RUR5 UR 5SS/nSUR4SUR4S[ R4S[ R44Hqup#SU-US'[U5upEUR[R"UR5R55[R"U5U5 Ms g) z. Test that the prefix values are as expected. -cNprefix exec_prefix base_prefixbase_exec_prefixzimport sys; print(sys.%s))rrErhrrr_rJrrr0rpathlibPathstripr()rRr*rexpectedr-r.s r/ test_prefixesBasicTest.test_prefixess t|| dkk4<<8zz|T4( t|| $ DLL ) COO , !5!5 6 !8 F 169CF#C(HC   W\\#))+*<*<*>?$\\(3V =!8r1c r[UR5 UR[RURSS9 UR 5SS/nSSS[ [R"554S[R"54S [R"54S [ [R"S 5544HSup#URU5 S U-US '[USS9upEURUR5X55 SSS5 MU SUR 54S[ R"44HTupcURU5 SUS3US '[USS9upEURUR5X55 SSS5 MV g!,(df  M=f!,(df  Mz=f)B Test that the sysconfig functions work in a virtual environment. FrrNzget_preferred_scheme("prefix")rzget_default_scheme()ris_python_build()get_makefile_filename()get_config_h_filename()!get_config_var("Py_GIL_DISABLED")Py_GIL_DISABLED%import sysconfig; print(sysconfig.%s)rrrnrSrKimport sys; print(sys.))rrErhrrr_strrHis_python_buildget_makefile_filenameget_config_h_filenameget_config_varrr0rrrJrKrRr*callrr-r.rs r/test_sysconfigBasicTest.test_sysconfigs t|| dkk4<<%Hzz|T4( 7 , #i&?&?&A"B C & (G(G(I J & (G(G(I J 0 ))*;< = ? @NDd#@4GA'g>  h<$# @4::< ( !5!5 6  ND d#1$q9A'g>  h<$#  $#$#s5F6F' F$ ' F6 zNeeds symlinksc P[UR5 UR[RURSS9 UR 5SS/nSSS[ [R"554S[R"54S [R"54S [ [R"S 5544HSup#URU5 S U-US '[USS9upEURUR5X55 SSS5 MU SUR 544HTupcURU5 SUS3US '[USS9upEURUR5X55 SSS5 MV g!,(df  M=f!,(df  Mz=f)rTrrNrrrrrrrrrrrnrSrr)rrErhrrr_rrHrrrrrr0rrrs r/test_sysconfig_symlinks!BasicTest.test_sysconfig_symlinks;so t|| dkk4<<$Gzz|T4( 7 , #i&?&?&A"B C & (G(G(I J & (G(G(I J 0 ))*;< = ? @NDd#@4GA'g>  h<$# @4::< ( NDd#1$q9A'g>  h<$# $#$#s5F6F F  F% r@))r7)r:r8)r9 site-packages)r;)r>)r<r<z python%d.%dNrr cFUHn[RR"UR/UQ76n[R"U5 [RRXB5n[ US5nUR S5 SSS5 M g!,(df  M=f)zV Create some files in the environment which are unrelated to the virtual environment. wb Still here?N)r#rAr^rEmkdirrqwrite)rRpathsfilenamesubdirsdrrss r/create_contentsBasicTest.create_contentsnsl G T\\4G4A HHQKa*Bb$1'   s 2B B c&URURS5 [R"UR5 URHn[ R R"UR/US-Q76nUR[ R RU55 [US5nURUR5S5 SSS5 M [R"SS9nURUR5 URH_n[ R R"UR/US-Q76nUR[ R RU55 Ma g!,(df  GMG=f)z5 Test creating environment in an existing directory. foo)rrbrNTr)r ENV_SUBDIRSrrrEr#rAr^rrPrqrrrrr)rRrrrsrs r/test_overwrite_existing!BasicTest.test_overwrite_existingzs T--u5 DLL!''GdllBg.@BB OOBGGNN2. /b$1  >: ( //-t||$''GdllBg.@BB   RWW^^B/ 0(  s 4!F F c[R"U5Hn[RRX5n[RR U5(d$[RR U5(a[R "U5 M[RRU5(dM[U5 M grW) r#rrAr^risfileremoverr)rRrArs r/clear_directoryBasicTest.clear_directorysq**T"Bd'Bww~~b!!RWW^^B%7%7 " r""r #r1cURSSHn[RR"UR/UQ76n[ US5nUR S5 SSS5 UR[[4[RUR5 URUR5 M g!,(df  Nc=f)Nrr1) rr#rAr^rErqr assertRaises ValueErrorOSErrorrrr")rRrrrss r/test_unoverwritable_fails#BasicTest.test_unoverwritable_failss%%bq)Edll3U3Bb$1    z73T[[$,, O   . *s B99 C cSGHTn[R"US9nURURUR5 UR UR 5 UR UR5 UR "UR6 URUR UR5n[RRU5(dKURUR 5n[SU-5 [S[R"U5-5 UR![RRU5SU-5 GMW g)z3 Test upgrading an existing environment directory. FT)rrrrN)rrrhrrErrGr>r<rlrMr#rArPr'rr)rRrrrrs r/ test_upgradeBasicTest.test_upgrades%Goog6G  ! !'..$,, ? JJt{{ # JJt|| $ JJ !""4;;9B77>>"%%&&t{{3'",-hB/0 OOBGGNN2.0G"0L M%r1cSH[up[R"SUS9nURUR5 UR S5nUR SU-U5 M] g)z* Test isolation from system site-packages ))Ttrue)FfalseT)rrrz"include-system-site-packages = %s N)rrrrErur)rRsspsrrs r/test_isolationBasicTest.test_isolationsT9FCooDsKG NN4<< (..|)rRrr_r-r.s r/test_executable_symlinks"BasicTest.test_executable_symlinksst t||//t<t||$  - /!12 elln5r1r6z&contains invalid characters on Windowscp[UR5 [R"S5nUcUR S5 Sn[ R R[ R RUR5U5n[R"SS9nURU5 [ R RX0RS5n[ R RURS5n[US 5nURS [R "U5S 35 SSS5 [#X/5upUR%5n UR'UR)5U S ;5 UR+U S UR)55 g!,(df  Nu=f)z; Test that the template strings are quoted properly (bash) bashNbash required for this test "';&&$e|'"Tractivateztest_special_chars.shwsource r python -c 'import sys; print(sys.executable)' python -c 'import os; print(os.environ["VIRTUAL_ENV"])' deactivate rrrrEshutilwhichskipTestr#rAr^rBrrrrGrqrshlexquoter0 splitlinesrr>assertEndsWith) rRrErrErrH test_scriptrsr-r.liness r/test_special_chars_bash!BasicTest.test_special_chars_bashs; t||||F# < MM7 8!'',,rww// =xH//-w77<<jAggll4<<1HI +s #q GGgekk(345## $$   34  )U1X56 E!Hhoo&78$ #s *F'' F5c[UR5 [R"S5=(d [R"S5nUcUR S5 Sn[ R R[ R RUR5U5n[R"SS9nURU5 [ R RX0RS5n[ R RURS 5n[US 5nURS [R "U5S 35 SSS5 [#X/5upUR%5n UR'UR)5U S ;5 UR+U SUR)55 g!,(df  Nu=f)z: Test that the template strings are quoted properly (csh) tcshcshNzcsh required for this testrGTrz activate.cshztest_special_chars.cshrIrJrKrrrL) rRrZrrErrHrTrsr-r.rUs r/test_special_chars_csh BasicTest.test_special_chars_cshsI t||ll6"9fll5&9 ; MM6 7!'',,rww// =xH//-w77<<nEggll4<<1IJ +s #q GGgekk(345## $$   23  )U1X56 E!Hhoo&78$ #s +*G Gzonly relevant on Windowsc ([UR5 Sn[RR [RR UR5U5n[ R"SS9nURU5 [RR X RS5n[RR URS5n[US5nURSUSURS URS 35 S S S 5 [U/5upxUR5n URUR!5U S ;5 UR#U S UR!55 g !,(df  Nu=f)z? Test that the template strings are quoted properly on Windows z'&&^$eTr activate.batztest_special_chars.batrIz @echo off "z" & z* -c "import sys; print(sys.executable)" & z> -c "import os; print(os.environ['VIRTUAL_ENV'])" & deactivateNrr)rrEr#rAr^rBrrrrGrqrrMr0rRrr>rS) rRrrErrH test_batchrsr-r.rUs r/test_special_chars_windows$BasicTest.test_special_chars_windows"s+ t||'',,rww// =xH//-w77<<nEWW\\$,,0HI *c "a GG zxxj Jxxj!!! "#   -  )U1X56 E!Hhoo&78# "s $0F Fc[UR5 [RR [RR UR5S5n[ R"SS9nURU5 [RR XRS5n[USURSS/SS 9upEURUR5S 5 g ) z Test handling of Unicode paths u ϼўТλФЙTrr^&rzprint(0)oemrn0N)rrEr#rAr^rBrrrrGr0rMrr)rRrErrHr-r.s r/test_unicode_in_batch_file$BasicTest.test_unicode_in_batch_file9s t||'',,rww// =~N//-w77<<nE sDHHdJ 7  c*r1zsymlinks on Windowsc[UR5 [RR [RR UR5S5n[ S5n[5Ul[R"SSS9nURURU5upESnURUSUSU35 SSS5 g!,(df  g=f) z. Test handling of failed symlinks on Windows. rz os.symlinkTr7z%'[A-Z]:\\\\(?:[^\\\\]+\\\\)*[^\\\\]+'zUnable to symlink z to N)rrEr#rAr^rBrr( side_effectrrrhrr)rRrE mock_symlinkr_r.filepath_regexs r/test_failed_symlinkBasicTest.test_failed_symlinkIs t||'',,rww// =vF < L'.yL $ooD4@G**7>>7CFAEN   S%77GtNK["\ ] ! s (AC Cc,[5 [UR5 UR[R UR5 [ URSS9SS/5upURUR5SR55 g)z1 Test that the multiprocessing is able to spawn. Tr[rzrfrom multiprocessing import Pool; pool = Pool(1); print(pool.apply_async("Python".lower).get(3)); pool.terminate()r=N) rrrErhrrr0r_rrr>rRr-r.s r/test_multiprocessingBasicTest.test_multiprocessingXsr 34t|| dkk4<<8!> ! ! hoo&78r1c*[5 [UR5 UR[R UR5 [ RR[S5n[R"URSS9SU/5 g)z7 Test that the multiprocessing is able to spawn itself z_test_venv_multiprocessing.pyTr[-IN) rrrErhrrr#rAr^r r check_callr_)rRscripts r/test_multiprocessing_recursion(BasicTest.test_multiprocessing_recursionksc 34t|| dkk4<<8m-LMtzztz)rRrErrHrTrsr-r.s r/%test_deactivate_with_strict_bash_opts/BasicTest.test_deactivate_with_strict_bash_optsws||F# < MM7 8t||//-t||$77<< dkk:Fggll4<<1AB +s #q GG&Z(## $$  34 biik* biik* $ #s E Erzonly relevant on macOSc$[UR5 [R"5nUR UR5 [ UR SS9SS/5up#URUR5SR55 g)NTr[rz5import os; print("__PYVENV_LAUNCHER__" in os.environ)False) rrErrrr0r_rrr>)rRrr-r.s r/test_macos_envBasicTest.test_macos_envslt||//#t||$!> C!EF gnn&67r1c[UR5 UR[R-nUR [ [ RU5 UR [ [ R[U55 g)zV Test that venv creation fails when the target directory contains the path separator. N) rrEr#pathsepr&r'rrr)rR bad_itempaths r/test_pathsep_errorBasicTest.test_pathsep_errorsS t||||bjj0  *dkk<@ *dkk8L3IJr1c  [UR5 [Rn[R R [R"55nUR[U5 [R RX R5n[R"U5 [R"[RU5 [R RX!UR S5n[R""U5 [R RUS5n[$R&"S5(aSOSnS[R(R*[R(R,U3n[R RUUU5n/n [R GHn U R/S5(a\[R R1U 5(a6[R2"U [R RX!55 MtMv[R R1[R RU S55(a[R4"U 5n [7X5n U Hn X;aM U S:XaM[R RX5n[R R1U5(a[R8"X5 Mm[R R;U5(dM[R<"U[R RXM5[6S 9 M GMU R?U 5 GM [R RX RUR@5S S S S UR/n[RBRU 5n[$R&"S5nU(a[$RD"5(aJ[R RG[R RI[R55n[RJS:XaSnOSnSUUU0n[RLROS5=n(aUUS'[PRR"UUS9 URU5SSS/n[WU5unnURYUR[5U;5 g)zZ Test that when create venv from non-installed python, the zip path value is as expected. rzos.pyrtrr=z.zipr )ignorerrrrLIBDIRrDYLD_LIBRARY_PATHLD_LIBRARY_PATH PYTHONPATH ASAN_OPTIONS)rz-Srzimport sys; print(sys.path)N).rrErJ platlibdirr#rArBrCrD addCleanupr^rGrrMcopy2rSr<makedirsrHr version_infomajorminorrr copyfilerrcopyrcopytreeappendrMrrabspathrrNr$getr rur_r0rr>)rRrnon_installed_dirrGlibdirlandmark abi_thread stdlib_zip zip_landmark'additional_pythonpath_for_non_installedeachpathnames ignored_namesrFrr* pythonpathld_library_pathld_library_path_env child_env asan_optionsr-r.s r/%test_zippath_from_non_installed_posix/BasicTest.test_zippath_from_non_installed_posixs t||^^ GG,,X-=-=-?@  12/=  S^^V,/TXXa[I F77<<0%445FGGSR c..445c6F6F6L6L5Mj\Z ww||$5$.$.0 35/H  ((77>>(++OO  %6CE, Xw ?@@ 8, 6x G !D, . h5Bww~~b)) B/r**BGGLL,F/EG"8>>+!.ww||-{{DHHE+|| ZZ__ 35 $228<)";";"="= ggoobggoocnn.MNO <<8 #"5 "3 j#_ ::>>.9 9< 9(4In %cy1zz|T4)FG$S  ++-45r1ct[R"UR5n[U5 URtup#X- S- n[ R "U5 [US5n[US5H+upgSU3nURURS5U5 M- SSS5 g!,(df  g=f)z Test that the `activate` shell script contains no CR LF. This is relevant for Cygwin, as the Windows build might have converted line endings accidentally. rHrrzCR LF found in line s N) rrrErrrrrq enumeraterr) rRvenv_dir scripts_dirrk script_pathrviline error_messages r/.test_activate_shell_script_has_no_dos_newlines8BasicTest.test_activate_shell_script_has_no_dos_newliness<< -x"..+,z9  H +t $$VQ/"6qc :   w!7G0% $ $s $IIK  c:&r1cN^^SmSm"UU4SjS[R5nU"SS1S9nURURUR5 UR S5R 5nURS U5 UR T5nURUT5 g ) z= Test that ``scm_ignore_files`` can work with multiple SCMs. z .bzrignorez# For Bazaar. * c$>\rSrSrUU4SjrSrg)FBasicTest.test_create_scm_ignore_files_multiple..BzrEnvBuilderic>[RRURT5n[ USSS9nUR T5 SSS5 g!,(df  g=f)NrIrrn)r#rAr^rErqr)rRrgitignore_pathfilebzrignore_namecontentss r/create_bzr_ignore_file]BasicTest.test_create_scm_ignore_files_multiple..BzrEnvBuilder.create_bzr_ignore_filesB!#goo~!N.#@DJJx(A@@s A A r~N)rwrxryrzrr})rrsr/ BzrEnvBuilderrs  ) )r1rrbzrrrrN) rrrhrrErurRrr)rRrrgitignore_lines bzrignorerrs @@r/%test_create_scm_ignore_files_multiple/BasicTest.test_create_scm_ignore_files_multiples &' ) )DOO )  %@ gnndll;55lCNNP c?+//?  H-r1cUR[RUR5 UR [ 5 UR S5 SSS5 URSUR S55 g!,(df  N0=f)zS Test that no default ignore files are created when ``scm_ignore_files`` is empty. rNrr)rhrrrEr&FileNotFoundErrorrurrXs r/"test_create_scm_ignore_files_empty,BasicTest.test_create_scm_ignore_files_empty'sg dkk4<<8   0 1  ' ' 52 211,? A2 1s A<< B cUR[RSUR/5 UR S5R 5nUR SU5 g)zH Test that default SCM ignore files are created by default via the CLI. rrrN)rhrmainrErurRr)rRrs r/test_cli_with_scm_ignore_files(BasicTest.test_cli_with_scm_ignore_files5sH dii/4<<)HI55lCNNP c?+r1cSSUR/nUR[RU5 UR [ 5 UR S5 SSS5 g!,(df  g=f)zK Test that ``--without-scm-ignore-files`` doesn't create SCM ignore files. rrrN)rErhrrr&rrurks r/!test_cli_without_scm_ignore_files+BasicTest.test_cli_without_scm_ignore_files?sR  !=t||L dii.   0 1  ' ' 52 1 1s A  A.c[RRn[RS:XaS[ [ 4S[ R "5[ R"54/nSSKn[R"S5nU(a+/UQSXD4PSURU5URU54PnO8S[ [ 4S[ R "5[ R"54/nUH[upVnURUSU35 U(aURU"Xg55 OURU"Xg55 SSS5 M] g!,(df  Mo=f)Nr@Tr ProgramFilesF-)rr _same_pathrJrNrlowerupper_winapir#getenvGetShortPathNameGetLongPathNamerrr)rR same_pathtestsr progfilesrppath1path2s r/test_venv_same_pathBasicTest.test_venv_same_pathJs'OO.. <<7 "vv&v||~v||~6E  .1I90733I>@W@WXa@bcvv&  7E %OAeq01OOIe$;<$$Yu%<= 21 %11s 7E E c[UR5 [R"UR5 URnSU;aSU;aUR SS5n[ RRURURU5n[R"USSU-/5 g![Ra URSU-5 gf=f)z1 Test that the GUI launcher runs the GUI python. r=pythonwrz6import sys; assert sys._base_executable.endswith('%s')z venvwlauncher.exe did not run %sN)rrErrrMreplacer#rAr^rGr rur)fail)rRexenameenvpyws r/test_venvwlauncherBasicTest.test_venvwlauncheris t|| DLL!(( w yG';ooh :GdllDKKA D  ! !642=?F2G#H I,, D II87B C DsB33(CCr~)7rwrxryrzr{rrrrrrrrequireVenvCreaterrunittest skipUnlessrr rJrNrrrrr"r)r-r4r9r?rBskipIfr#rFrVr[r`rfrmrqrwrzr~rrrrrrrrrrr}r~r1r/rrss)+//J:CB58!;F==$==@ (89=:=B ||w     MC$4$4Ra$88 9 MC$4$4Ra$88/ J   (1$/N*K(898:8. 6 6(89 6: 6__RWW_&NO9P92__RWW_&NO9P92D*DE9F9,D*DE +F +D:[].0 ^0 ^99$ M M__RWW_&?@+A+$13KL8M8K__RWW_&?@R6AR6hHH ''.., A A,,66>> D*DEDFDr1rc\rSrSrSrSrSrSrSrSr \ RS5r \ "5\"S 5S 55rS rg ) EnsurePipTesti}z%Test venv module installation of pip.c[URSS9SS/5upURS5nURUS5 URS5nURUR 5S5 g)NTr[rz1try: import pip except ImportError: print("OK")latin-1rOK)r0r_r(rrrps r/assert_pip_not_installed&EnsurePipTest.assert_pip_not_installedsk!> B!DEjj# b!jj# d+r1c[UR5 UR[RUR5 UR 5 grWrrErhrrrrXs r/test_no_pip_by_default$EnsurePipTest.test_no_pip_by_defaults2t|| dkk4<<8 %%'r1c[UR5 UR[RURSS9 UR 5 g)NF)rrrXs r/test_explicit_no_pip"EnsurePipTest.test_explicit_no_pips7t|| dkk4<<%H %%'r1c$[[RS5nURUR 5S5 SSS5 UR [R R[R55 g!,(df  NK=f)Nrr1)rqr#devnullrrrrrArP)rRrss r/ test_devnullEnsurePipTest.test_devnullsW "**d #q   QVVXs +$ rzz23$ #s !B Bc [UR5 [5nSUS'SUS'[R"5nX2S'SnSnSnU4Hupx[ R RX75n [ R"U 5 [ R RX5n [U S 5n U RU5 SSS5 M UR5 UR[RURUS S 9 SSS5 SSS5 SSS5 [UR!S S 9S SS SSSSS/ 5upU R#S5n UR%U S5 U R#S5n SR'[(R*"55nUR%U S[-U5U5 [ R."UR5R#S5nUR1X5 [5nUR5 SUS'[UR!S S 9S SS SSSS/5upSSS5 SSS5 U R#S5n [2R4"SSU [2R6S9n SSKnUR%U R=5S5 U R#S5n UR1SU 5 U(dUR?5 gg!,(df  GM=f!,(df  GN=f!,(df  GN=f!,(df  GN =f!,(df  N=f!,(df  GN=f![:a( [2R4"SSU [2R6S9n Nf=f)NrPYTHONWARNINGS1PIP_NO_INSTALLHOMEz[global] no-install=1)rzpip.ini)z.pipzpip.confrIT)rrr[z-Wzignore::DeprecationWarningzignore::ImportWarningrtrrz --versionrrzpip {}zensurepip._uninstallzl^(WARNING: )?The directory .* or its parent directory is not owned or is not writable by the current user.*$)flagsrz<^WARNING: Disabling truststore since ssl support is missing$zSuccessfully uninstalled pip) rrErrCrr#rAr^rrqr nicer_errorrhrrr0r_r(rformat ensurepipversionlenfsencoderresub MULTILINEssl ImportErrorrstripr)rRrenvvarshome_dir bad_config win_locationposix_locationrfnamedirpathfpathrsr-r.expected_versionrErs r/do_test_with_pipEnsurePipTest.do_test_with_pipst|| "g)1G$ % ),G$ %,,.("*5  2 !5'5&7NG ggll8=GHHW%GGLL8EeS)Q +*) '8%%'))$++t||?S37*9(#/#H !>1,dUK!)* jj# b!jj##??9+<+<+>? 3c"2346FG++dll+229= g# ! "g!!#-5()')F6140)23 $#jj#ffNOQ . )  r*jj# 4c:$  ) ) +$E*) ('#/.# "l$## "0 )&&N2<<)C )s LA3L 3K' L !+K: L LM(L0MM' K7 1 L : L L  L L L-0 L> :M M/NNc## Sv g![RagnUR=(d SRSS9nUR=(d SRSS9nUR USUSU35 SnAgSnAff=f7f)z Capture output from a failed subprocess for easier debugging. The output this handler produces can be a little hard to read, but at least it has all the details. Nr1r)errorsz **Subprocess Output** z **Subprocess Error** )r r)rfr(rr)rRexcr-r.s r/r EnsurePipTest.nicer_errors  ,, ::$,,I,>C::$,,I,>C II%**-/)),/   s+B BBAA?:B?BBcpucHURS5 URS5 g)NFT)r!rXs r/ test_with_pipEnsurePipTest.test_with_pips  e$ d#r1r~N)rwrxryrzr{rrrrr! contextlibcontextmanagerr r rr)r}r~r1r/rr}s^/,( ( 4^,@$u$$r1r__main__rW)9r{r+rr#os.pathrrrMrr rJrHrCrP test.supportrrrrrrr r r r r rrtest.support.os_helperrrrrrtest.support.testcaserrr unittest.mockrrctypesrrrrrKrSrSkipTestr0TestCaser3rrrwrr~r1r/r6sM    EEEE 661 % ''JJ#//!. s~~-@B MW   D EE$-x  /-^G DG DTX$HX$X$v z MMOk Fs:EEE