Your IP : 216.73.216.85


Current Path : /opt/alt/python37/lib/python3.7/site-packages/astroid/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/astroid/__pycache__/test_utils.cpython-37.opt-1.pyc

B

��\	�@sVdZddlZddlZddlZddlZddlmZd
dd�Zddd�Zej	dd	��Z
dS)z@Utility functions for test code that uses astroid ASTs as input.�N)�nodescsddd�����fdd�}|S)zY Compare version of python interpreter to the given one. Skip the test
    if older.
    Nc
SsZ|p|}ytdd�|�d�D��Stk
rT}ztdj|d��|�Wdd}~XYnXdS)Ncss|]}t|�VqdS)N)�int)�.0�v�r�C/opt/alt/python37/lib/python3.7/site-packages/astroid/test_utils.py�	<genexpr>sz1require_version.<locals>.parse.<locals>.<genexpr>�.z6{string} is not a correct version : should be X.Y[.Z].)�string)�tuple�split�
ValueError�format)r
�default�excrrr�parseszrequire_version.<locals>.parsecsjtjdd�}��d�|kr.��d�kr6nn|Sd�dd�tjD���t�|����fdd��}|S)	N��0�4r	css|]}t|�VqdS)N)�str)rrrrrr)szArequire_version.<locals>.check_require_version.<locals>.<genexpr>cs:�dk	r|�d��f�n�dk	r6|�d��f�dS)Nz)Needs Python > %s. Current version is %s.z*Needs Python <= %s. Current version is %s.)ZskipTest)�self�args�kwargs)�maxver�minver�str_versionrr�new_f+sz=require_version.<locals>.check_require_version.<locals>.new_f)�sys�version_info�join�	functools�wraps)�f�currentr)rrr)rr�check_require_version$s$z.require_version.<locals>.check_require_version)Nr)rrr$r)rrrr�require_versions
r%cs�fdd�|�tj�D�|S)Ncsg|]}|j�kr|�qSr)�name)r�n)r&rr�
<listcomp><sz!get_name_node.<locals>.<listcomp>)Znodes_of_classr�Name)Z
start_fromr&�indexr)r&r�
get_name_node;sr+c
cs*t�d|�z
dVWdt�d|�XdS)N�alwaysr)�warnings�simplefilter)Zwarningrrr�enable_warning?s
r/)NN)r)�__doc__�
contextlibr rr-Zastroidrr%r+�contextmanagerr/rrrr�<module>s
'