Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_sys.cpython-311.opt-2.pyc |
�
�Ke�� � � � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl
Zd dlmZ d dl
m
Z
d dlmZmZ d dl
mZ d dl
mZ d dlZd dlZd dlZd adZ G d� d ej � � Z G d
� dej � � Z G d� d
ej � � Z G d� dej � � Zej j G d� dej � � � � Zej j G d� dej � � � � Ze dk r ej! � � dS dS )� N)�support)� os_helper)�assert_python_ok�assert_python_failure)�threading_helper)�
import_helper�n2BI2nc � � e Zd Zd� Zd� Zd� ZdS )�DisplayHookTestc � � t j }t j � � 5 } |d� � d d d � � n# 1 swxY w Y | � |� � � d� � | � t j d� � t `t j � � 5 } |d � � d d d � � n# 1 swxY w Y | � |� � � d� � | � t t d� � � � | �
t |� � t j } t `| �
t |d� � |t _ d S # |t _ w xY w)N�* z42
� �_)�sys�__displayhook__r �captured_stdout�assertEqual�getvalue�builtinsr �
assertTrue�hasattr�assertRaises� TypeError�stdout�RuntimeError)�self�dh�outr s �7/usr/local/apps/python3/lib/python3.11/test/test_sys.py�test_original_displayhookz)DisplayHookTest.test_original_displayhook s� � �
�
��
�
$�
&�
&� �#��B�r�F�F�F� � � � � � � � � � � ���� � � � �
���������0�0�0������R�(�(�(��J�
�
$�
&�
&� �#��B�t�H�H�H� � � � � � � � � � � ���� � � � �
���������,�,�,����G�H�c�2�2�2�3�3�3�
���)�R�(�(�(���� ��
����l�B��3�3�3��C�J�J�J���C�J����s* �8�<�<�%B=�=C�C�#E2 �2F c �� � t j } t `t ddd� � }| � t t
|� � |t _ d S # |t _ w xY w)N�42�<string>�single)r �displayhook�compiler r �eval)r r% �codes r �test_lost_displayhookz%DisplayHookTest.test_lost_displayhook9 sZ � ��o�� *����4��X�6�6�D����l�D�$�7�7�7�)�C�O�O�O��k�C�O�)�)�)�)s �9A �A#c �� � d� }t j t d|� � 5 t ddd� � }| � t
t |� � d d d � � d S # 1 swxY w Y d S )Nc � � t ��N��
ValueError)�objs r �baddisplayhookz?DisplayHookTest.test_custom_displayhook.<locals>.baddisplayhookC � � ��� r% r"