https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/numpy/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/numpy/tests/__pycache__/test_warnings.cpython-310.pyc
o

6��a��@shdZddlZddlmZddlZddlZddlZGdd�dej�ZGdd�dej�Z	ej
jdd	��ZdS)
z
Tests which scan for certain occurrences in the code, they may not find
all of these occurrences but should catch almost all.
�N)�Pathc@s$eZdZdd�Zdd�Zdd�ZdS)�	ParseCallcCs
g|_dS�N)�ls)�self�r�;/usr/lib/python3/dist-packages/numpy/tests/test_warnings.py�__init__
s
zParseCall.__init__cCs tj�||�|j�|j�dSr)�ast�NodeVisitor�
generic_visitr�append�attr�r�noderrr�visit_AttributeszParseCall.visit_AttributecCs|j�|j�dSr)rr
�idrrrr�
visit_NameszParseCall.visit_NameN)�__name__�
__module__�__qualname__r	rrrrrrrsrcs$eZdZ�fdd�Zdd�Z�ZS)�	FindFuncscst���||_dSr)�superr	�_FindFuncs__filename)r�filename��	__class__rrr	s

zFindFuncs.__init__cCs�t�}|�|j�tj�||�|jddks|jddkr0|jdjdkr0t	d�
|j|j���|jddkrmt
|j�dksE|jd	d
krod|jkrLdSt
|j�dkrUdSd
d�|jD�}d|vrcdSt	d�
|j|j���dSdS)N����simplefilter�filterwarningsr�ignorezFwarnings should have an appropriate stacklevel; found in {} on line {}�warn�����warningsztesting/tests/test_warnings.py�cSsh|]}|j�qSr)�arg)�.0�kwrrr�	<setcomp>2sz'FindFuncs.visit_Call.<locals>.<setcomp>�
stacklevel)r�visit�funcr
rrr�args�s�AssertionError�formatr�lineno�len�keywords)rr�pr-rrr�
visit_Calls0�
��zFindFuncs.visit_Call)rrrr	r5�
__classcell__rrrrrsrc	Cs�ttj�j}|�d�D]?}|d|jvrq||dkrq||ddkr%qt�t|���}t	�
|���}t|��
|�Wd�n1sEwYqdS)Nz*.py�testingz__init__.py�random)r�numpy�__file__�parent�rglob�parents�tokenize�open�strr
�parse�readrr+)�base�path�file�treerrr�test_warning_calls:s���rG)
�__doc__�pytest�pathlibrr
r>r9rrr�mark�slowrGrrrr�<module>s"

https://t.me/RX1948 - 2025