File: D:/Python311/Lib/test/__pycache__/test_trace.cpython-311.opt-1.pyc
�
��Vc�R � �D � d dl Z d dlZd dlmZ d dlmZmZmZ d dlm Z m
Z
d dlZd dlZd dl
Z
d dl
mZ d dlmZ d� Zd� Zd � Zd
� Zd� Zd� Zd
� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z G d� de� � Z G d� dej! � � Z" G d� dej! � � Z# G d� dej! � � Z$ G d� dej! � � Z% G d� d ej! � � Z& G d!� d"ej! � � Z' G d#� d$ej! � � Z( G d%� d&ej! � � Z)e*d'k r ej+ � � dS dS )(� N)�captured_stdout)�TESTFN�rmtree�unlink��assert_python_ok�assert_python_failure)�Trace)�testmodc �D � | � d� � r
| dd� } | S )z8Given a .pyc filename converts it to the appropriate .pyz.pycN���)�endswith)�filenames �#D:\Python311\Lib\test\test_trace.py�
fix_ext_pyr s* � ����� � � !��C�R�C�=���O� c � � t j � t j � t � � � � d } t t � � | fS )z4The .py file and module name of this file (__file__)r )�os�path�splitext�basename�__file__r )�modnames r �my_file_and_modnamer s? � ��g���r�w�/�/��9�9�:�:�1�=�G��h����(�(r c � � | j j S �N)�__code__�co_firstlineno��funcs r �get_firstlinenor! s
� ��=�'�'r c � � | }|}||z }|S r � )�x�y�a�b�cs r �traced_func_linearr) * s � � �A� �A� �A��A��Hr c �8 � | }t d� � D ]}||z
}�|S �N� ��range)r$ r% r( �is r �traced_func_loopr0 0 s, � � �A�
�1�X�X� � �� �Q�����Hr c �6 � | |z t j d� � z S )N� )r r )r$ r% s r �traced_func_importingr3 6 s � ��q�5�7�<��?�?�"�"r c �, � t | | � � }|| z S r �r) )r$ r( s r �traced_func_simple_callerr6 9 s � ��1�a� � �A��q�5�Lr c �J � t | � � }|t || � � z
}|S r )r6 r3 )r$ �ks r �traced_func_importing_callerr9 = s) � �!�!�$�$�A�� �q�!� $� $�$�A��Hr c # �@ K � d}t | � � D ] }||z V � �
d S r+ r- )�numr( r/ s r �traced_func_generatorr<