python (3.11.7)
    eH                         d Z ddlZddlZddlZddlmZmZ ddlZddlmZ  G d dej	                  Z
 e             G d dej	                              Zed	k    r ej
                     dS dS )
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
dS )	TestScriptHelperc                 j    t          j        dd          }|                     d|d         d           d S )N-cimport sys; sys.exit(0)r   zreturn code was not 0)r   assert_python_okassertEqual)selfts     K/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_script_helper.pytest_assert_python_okz&TestScriptHelper.test_assert_python_ok
   s8    *41JKKAaD"9:::::    c                 f    t          j        dd          \  }}}|                     d|d           d S )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   s9    $:4OOCAr#@AAAAAr   c                    |                      t                    5 }t          j        dd           d d d            n# 1 swxY w Y   t	          |j                  }|                     d|           |                     d|d           d S )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   s    
~
.
. 	@-*4???	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@
/00	
oy111
mY4M
NNNNN   =AAc                    |                      t                    5 }t          j        dd           d d d            n# 1 swxY w Y   t	          |j                  }|                     d|           |                     d|d           d S )Nr	   r
   zProcess return code is 0
zunexpected command line.r   )r   r   r   r   r   r    r!   r"