python (3.12.0)
ΑeH d Z ddlZddlZddlZddlmZmZ ddlZddlmZ G d dej Z
e G d dej Zed k( r ej yy)
zEUnittests for test.support.script_helper. Who tests the test helper? N)
script_helperrequires_subprocess)mockc e Zd Zd Zd Zd Zd Z ej d d Z ej d d Z
y) TestScriptHelperc \ t j dd }| j d|d d y )N-cimport sys; sys.exit(0)r zreturn code was not 0)r assert_python_okassertEqual)selfts K/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_script_helper.pytest_assert_python_okz&TestScriptHelper.test_assert_python_ok
s, **41JKAaD"9: c ^ t j dd \ }}}| j d|d y )Nr sys.exit(0)r zreturn code should not be 0)r assert_python_failureassertNotEqual)r
rcouterrs r test_assert_python_failurez+TestScriptHelper.test_assert_python_failure s- $::4OCAr#@Ar c | j t 5 }t j dd d d d t j
}| j
d| | j
d|d y # 1 sw Y ExY w)Nr r z
command line:zunexpected command linemsg)assertRaisesAssertionErrorr r str exceptionassertInr
error_context error_msgs r test_assert_python_ok_raisesz-TestScriptHelper.test_assert_python_ok_raises sl
~
. @-**4? @
//0
oy1
mY4M
N @ @ A11A:c | j t 5 }t j dd d d d t j
}| j
d| | j
d|d y # 1 sw Y ExY w)Nr r
zProcess return code is 0
zunexpected command line.r )r r r r r r r! r"