Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_script_helper.cpython-311.pyc |
�
�KeH � �� � 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_helper�requires_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�-c�import sys; sys.exit(0)r zreturn code was not 0)r �assert_python_ok�assertEqual)�self�ts �A/usr/local/apps/python3/lib/python3.11/test/test_script_helper.py�test_assert_python_okz&TestScriptHelper.test_assert_python_ok
s8 � ��*�4�1J�K�K������A�a�D�"9�:�:�:�:�:� c �f � t j dd� � \ }}}| � d|d� � d S )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 s9 � �$�:�4��O�O���C�����A�r�#@�A�A�A�A�Ar 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 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 s� � �
�
�
�~�
.�
.� @�-��*�4��?�?�?� @� @� @� @� @� @� @� @� @� @� @���� @� @� @� @��
�/�0�0� ��
�
�o�y�1�1�1��
�
�m�Y�4M�
�N�N�N�N�N� �=�A�Ac � � | � 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"