File: D:/Python311/Lib/test/test_tools/__pycache__/test_gprof2html.cpython-311.pyc
�
��Vc� � � � d Z ddlZddlZddlZddlmZ ddlZddlmZmZ e� � G d� dej � � Z
edk r ej � � dS dS )z7Tests for the gprof2html script in the Tools directory.� N)�mock)�skip_if_missing�import_toolc � � e Zd Zd� Zd� ZdS )�Gprof2htmlTestsc � �� t d� � | _ t j ��fd�}| � |� � g t _ d S )N�
gprof2htmlc � �� � t _ d S )N)�sys�argv)�oldargvs ��3D:\Python311\Lib\test\test_tools\test_gprof2html.py�fixupz$Gprof2htmlTests.setUp.<locals>.fixup s �� ��C�H�H�H� )r �gprofr r �
addCleanup)�selfr r
s @r �setUpzGprof2htmlTests.setUp sO �� � ��.�.��
��(�� � � � � ������������r c �� � t j � | j d� � 5 }t j � � 5 }t j � |d� � }t |d� � �
� � d|gt _ | j �
� � d d d � � n# 1 swxY w Y d d d � � n# 1 swxY w Y | � |j j � � d S )N�
webbrowser�abc�wbr )r �patch�objectr �tempfile�TemporaryDirectory�os�path�join�open�closer r �main�
assertTrue�called)r �wmock�tmpdir�fns r �
test_gprofzGprof2htmlTests.test_gprof s< � �
�Z�
�
�t�z�<�
8�
8� �E��+�-�-� �17�����f�e�,�,�B���T�N�N� � �"�"�"�$�b�)�C�H��J�O�O���� � � � � � � � � � � ���� � � � � � � � � � � � � � � ���� � � � �
����
�)�*�*�*�*�*s5 �C�A*B0�$C�0B4 �4C�7B4 �8C�C�CN)�__name__�
__module__�__qualname__r r( � r r r r
s2 � � � � � �� � �+� +� +� +� +r r �__main__)
�__doc__r r �unittestr r �test.test_toolsr r �TestCaser r) r"