Sindbad~EG File Manager
�
'ΜgH � �� � 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_helper�requires_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�-c�import sys; sys.exit(0)r zreturn code was not 0)r �assert_python_ok�assertEqual)�self�ts �4/usr/local/lib/python3.12/test/test_script_helper.py�test_assert_python_okz&TestScriptHelper.test_assert_python_ok
s, � ��*�*�4�1J�K������A�a�D�"9�:� c �^ � t j dd� \ }}}| j d|d� y )Nr �sys.exit(0)r zreturn code should not be 0)r �assert_python_failure�assertNotEqual)r
�rc�out�errs r �test_assert_python_failurez+TestScriptHelper.test_assert_python_failure s- � �$�:�:�4��O���C�����A�r�#@�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 line��msg)�assertRaises�AssertionErrorr r �str� exception�assertIn�r
�
error_context� error_msgs r �test_assert_python_ok_raisesz-TestScriptHelper.test_assert_python_ok_raises sa � �
�
�
�~�
.�-��*�*�4��?� /��
�/�/�0� ��
�
�o�y�1��
�
�m�Y�4M�
�N� /�
.�� �A1�1A: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"