z<&̕7+SrSSKrSSKrSSKrSSKJrJr SSKrSSKJr "SS\R5r \"5"SS\R55r \ S :Xa\R"5 gg) zEUnittests for test.support.script_helper. Who tests the test helper?N) script_helperrequires_subprocess)mockc\rSrSrSrSrSrSr\R"S5S5r \R"S5S5r S r g ) TestScriptHelper c^[R"SS5nURSUSS5 g)N-cimport sys; sys.exit(0)rzreturn code was not 0)rassert_python_ok assertEqual)selfts >/opt/alt/python313/lib64/python3.13/test/test_script_helper.pytest_assert_python_ok&TestScriptHelper.test_assert_python_ok s,  * *41J K AaD"9:c^[R"SS5upnURSUS5 g)Nr sys.exit(0)rzreturn code should not be 0)rassert_python_failureassertNotEqual)rrcouterrs rtest_assert_python_failure+TestScriptHelper.test_assert_python_failures+$::4O  Ar#@ArcUR[5n[R"SS5 SSS5 [ WR 5nUR SU5 UR SUSS9 g!,(df  NG=f)Nr rz command line:zunexpected command linemsg) assertRaisesAssertionErrorrr str exceptionassertInr error_context error_msgs rtest_assert_python_ok_raises-TestScriptHelper.test_assert_python_ok_raisessa   ~ .-  * *4 ?/ //0  oy1 mY4M N / . A// A=cUR[5n[R"SS5 SSS5 [ WR 5nUR SU5 UR SUSS9 g!,(df  NG=f)Nr r zProcess return code is 0 zunexpected command line.r)r r!rrr"r#r$r%s r!test_assert_python_failure_raises2TestScriptHelper.test_assert_python_failure_raisessi   ~ .-  / /6O P/ //0  2I> /4  6 / .r*zsubprocess.Popenc[RR[SSS9n[ S5Ul[R "SSS5 URS UR5 URS UR5 URSSnUR[RUS5 URSU5 URS U5 URS U5 SSS5 g![a)nURSURS5 SnANSnAff=f!,(df  g=f) N interpreter_requires_environmentF return_valuebail out of unittestTr Noner-I-E)rpatchobjectr RuntimeError side_effect_assert_pythonr args call_count call_argssys executabler$ assertNotInr mock_popen mock_ire_funcr popen_commands r1test_assert_python_isolated_when_env_not_requiredBTestScriptHelper.test_assert_python_isolated_when_env_not_required&s ZZ  }A,136C%12H%IJ " F,,T4@   Q 5 5 6   Q 8 8 9&003A6M   S^^]1-= > MM&- 0 MM$ .   T= 133   F  !7!EE F 33s5D0C:B#D0: D-D(#D0(D--D00 D>c[RR[SSS9n[ S5Ul[R "SSS5 URSSnURS U5 URS U5 SSS5 g![a)nURSURS5 SnANmSnAff=f!,(df  g=f) z>Ensure that -I is not passed when the environment is required.r/Tr0r2r r3rNr5r6) rr7r8rr9r:r;r r<r>rArBs r4test_assert_python_not_isolated_when_env_is_requiredETestScriptHelper.test_assert_python_not_isolated_when_env_is_required8sZZ  }A,025B%12H%IJ " F,,T4@'003A6M   T= 1   T= 122   F  !7!EE F 22s4CB 6C CB;6C;CC CN) __name__ __module__ __qualname____firstlineno__rrr(r,rr7rFrI__static_attributes__rKrrrr sT;B O6 ZZ"#2$2" ZZ"# 2$ 2rrc\rSrSrSrSrSr\R"S5S5r \R"S5S5r \R"S5S5r \R"S5S 5r S r g ) TestScriptHelperEnvironmentHz5Code coverage for interpreter_requires_environment().chUR[[S55 S[RS'gN$__cached_interp_requires_environment) assertTruehasattrr__dict__rs rsetUp!TestScriptHelperEnvironment.setUpLs/  M#I J LJN EFrc*S[RS'grU)rrYrZs rtearDown$TestScriptHelperEnvironment.tearDownRsIM EFrzsubprocess.check_callc[RR[R5 [RR SS5 [ R"SS5UlUR[R"55 UR[R"55 URSUR5 SSS5 g!,(df  g=f)N PYTHONHOMEr4)rr7dictosenvironpop subprocessCalledProcessErrorr:rWrr/r r=rmock_check_calls r*test_interpreter_requires_environment_trueFTestScriptHelperEnvironment.test_interpreter_requires_environment_trueVs ZZ__RZZ ( JJNN< .*4*G*GB*OO ' OOMJJL M OOMJJL M   Q : : ; ) ( (s B!C C&c|[RR[R5 [RR SS5 [ R"5 UR[ R"55 URSUR5 SSS5 g!,(df  g=f)Nrar4) rr7rcrdrerfrr/ assertFalser r=ris r+test_interpreter_requires_environment_falseGTestScriptHelperEnvironment.test_interpreter_requires_environment_false_sm ZZ__RZZ ( JJNN< .  : : <   ]KKM N   Q : : ; ) ( (s A6B-- B;cR[RR[R5 [RR SS5 [ R"5 UR[ R"55 UR[ R"55 URSUR5 URSSnUR[RUS5 URSU5 SSS5 g!,(df  g=f)Nrar4rr6)rr7rcrdrerfrr/rnr r=r>r?r@r$)rrjcheck_call_commands r-test_interpreter_requires_environment_detailsITestScriptHelperEnvironment.test_interpreter_requires_environment_detailshs ZZ__RZZ ( JJNN< .  : : <   ]KKM N   ]KKM N   Q : : ;!0!:!:1!=a!@    S^^-?-B C MM$ 2 3) ( (s C!D D&c[RR[R5 S[RS'UR [ R"55 UR [ R"55 URSUR5 SSS5 g!,(df  g=f)N MockedHomerar) rr7rcrdrerWrr/r r=ris r5test_interpreter_requires_environment_with_pythonhomeQTestScriptHelperEnvironment.test_interpreter_requires_environment_with_pythonhometsp ZZ__RZZ ('3BJJ| $ OOMJJL M OOMJJL M   Q : : ; ) ( (s A8B// B=rKN)rLrMrNrO__doc__r[r^rr7rkrorsrwrPrKrrrRrRHs?N N ZZ'(<)< ZZ'(<)< ZZ'( 4) 4 ZZ'(<)rsjK ;:2x((:2z1<("3"31<1