| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/site-packages/_pytest/__pycache__/ |
Upload File : |
�
��HgS� �
�� � d Z ddlmZ ddlZddlmZ ddlmZ ddlZddlZddl Z ddl
mZ ddlZddl
Z
ddlZddlmZ ddlZddlmZ dd lmZ dd
lmZ ddlmZ ddlmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlZddl Z ddl m!Z! ddl m"Z" ddl#m$Z$ ddl#m%Z% ddl&m'Z' ddl&m(Z( ddl&m)Z) ddl*m+Z+ ddl,m-Z- ddl,m.Z. ddl,m/Z/ ddl,m0Z0 dd l,m1Z1 dd!l,m2Z2 dd"l,m3Z3 dd#l,m4Z4 dd$l,m5Z5 dd%l,m6Z6 dd&l7m8Z8 dd'l7m9Z9 dd(l:m;Z; dd)l<m=Z= dd*l>m?Z? dd+l>m@Z@ dd,l>mAZA dd-l>mBZB dd.lCmDZD dd/lEmFZF dd0lEmGZG dd1lHmIZI dd2lHmJZJ dd3lHmKZK dd4lHmLZL dd5lMmNZN dd6lMmOZO dd7lPmQZQ dd8lPmRZR dd9lPmSZS dd:lPmTZT dd;lUmVZV dd<lUmWZW dd=lXmYZY dd>lZm[Z[ dd?lZm\Z\ dd@lZm]Z] erddAl^m_Z_ dodB�Z`dpdD�ZadqdE�ZbdrdF�Zc e9dG�H� dsdJ�� Zd dtdK�ZedudL�ZfdvdM�ZgdwdO�Zh e9dG�H� dxdP�� Zi G dQ� dRe"j� � Zk G dS� dT� Zlemj� em� eo ej� dU� � h dV� eoel� eo el� � � Zq[l G dW� dXeke"j� ej� � Zt dydY�Zu G dZ� dNe"j� et� Zw G d[� d\e"j� � Zydzd]�Zzd{d^�Z{ G d_� d`et� Z|d|da�Z}d|db�Z~e ej� dG�c� G dd� de� � � Z�e ej� dG�c� G df� dg� � � Z�d}dh�Z� eYee�e?e f � Z�e G di� dC� � Z� d~dj�Z�ddk�Z� G dl� dIeke"�j � Z� G dm� dne�� Z�y)�z7Python test discovery, setup and run of test functions.� )�annotationsN)�Counter)�defaultdict)�partial)�Path)�Any)�Callable)�Dict)�final)� Generator)�Iterable)�Iterator)�Literal)�Mapping)�Pattern)�Sequence)�
TYPE_CHECKING)�fixtures)�nodes)�filter_traceback)�getfslineno)�
ExceptionInfo)�TerminalRepr)� Traceback)�saferepr)�
ascii_escaped)�get_default_arg_names)�
get_real_func)� getimfunc)�is_async_function)�is_generator)�LEGACY_PATH)�NOTSET��safe_getattr)�safe_isclass)�Config)�hookimpl)�Parser)�check_ispytest)�
FixtureDef)�FixtureRequest)�FuncFixtureInfo)�get_scope_node)�Session)�MARK_GEN)�ParameterSet)�get_unpacked_marks)�Mark)�
MarkDecorator)�normalize_mark_list)�fail)�skip��
fnmatch_ex)�import_path)�ImportPathMismatchError)�scandir)�
_ScopeName)�Scope)�StashKey)�PytestCollectionWarning)�PytestReturnNotNoneWarning)�PytestUnhandledCoroutineWarning)�Selfc � � | j ddddgd�� | j dddgd �� | j d
ddgd�� | j d
ddd�� y )N�python_files�argsz test_*.pyz *_test.pyz9Glob-style file patterns for Python test module discovery)�type�default�help�python_classes�Testz6Prefixes or glob names for Python test class discovery�python_functions�testzDPrefixes or glob names for Python test function and method discovery�Ddisable_test_id_escaping_and_forfeit_all_rights_to_community_support�boolFzcDisable string escape non-ASCII characters, might cause unwanted side effects(use at your own risk))�addini)�parsers �0C:\Python312\Lib\site-packages\_pytest/python.py�pytest_addoptionrS T s� � �
�M�M��
��k�*�
H� � � �M�M��
���
E� � � �M�M��
���
S� � � �M�M�N�
��-� � � �Metafuncc � � | j j d�� D ], } | j |j i |j �d|i�� �. y )N�parametrize��name�_param_mark)�
definition�iter_markersrW rF �kwargs)�metafunc�markers rR �pytest_generate_testsr` q sI � ��%�%�2�2�
�2�F� P������f�k�k�O�V�]�]�O��O�PrT c �L � | j dd� | j dd� y )N�markersa� parametrize(argnames, argvalues): call a test function multiple times passing in different arguments in turn. argvalues generally needs to be a list of values if argnames specifies only one name or a list of tuples of values if argnames specifies multiple names. Example: @parametrize('arg1', [1,2]) would lead to two calls of the decorated test function, one with arg1=1 and another with arg1=2.see https://docs.pytest.org/en/stable/how-to/parametrize.html for more info and examples.z�usefixtures(fixturename1, fixturename2, ...): mark tests as needing all of the specified fixtures. see https://docs.pytest.org/en/stable/explanation/fixtures.html#usefixtures )�addinivalue_line)�configs rR �pytest_configurere v s1 � �
���� �
� ���� S�rT c � � d}|dz
}|dz
}|dz
}|dz
}|dz
}|dz
}t j t |j | � � � t d� � y )
NzFasync def functions are not natively supported and have been skipped.
zMYou need to install a suitable plugin for your async framework, for example:
z
- anyio
z - pytest-asyncio
z - pytest-tornasync
z - pytest-trio
z - pytest-twistedz?async def function and no async plugin installed (see warnings))�reason)�warnings�warnrB �formatr7 )�nodeid�msgs rR �async_warn_and_skiprm � sp � �
S�C��X��C� �=��C��!�!�C��#�#�C����C����C��M�M�1�#�*�*�V�2D�E�F��Q�RrT T)�trylast�Functionc � � | j }t |� rt | j � | j }| j
j D �ci c] }||| ��
}} |di |��}t |d� st |d� rt | j � y|�/t j t d| j � d|�d�� � yc c}w )N� __await__� __aiter__zExpected None, but z
returned zj, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`?T� )�objr rm rk �funcargs�_fixtureinfo�argnames�hasattrrh ri rA )�
pyfuncitem�testfunctionru �arg�testargs�results rR �pytest_pyfunc_callr~ � s� � ��>�>�L���&��J�-�-�.��"�"�H�.8�.E�.E�.N�.N�O�s��X�c�]�"�O�H�O�
�
%�H�
%�F��v�{�#�w�v�{�'C��J�-�-�.� �
� ��
�
�&�%�j�&7�&7�%8�
�6�*� M_� _�
�
� �� Ps �
Cc � � | dz } |j � }|rt j || �� S y # t $ r Y y w xY w)N�__init__.py��path)�is_file�PermissionError�Package�from_parent)r� �parent�pkginit�has_pkginits rR �pytest_collect_directoryr� � sQ � � �]�"�G���o�o�'�� ��"�"�6��"�5�5��� � ���s �1 � =�=c � � | j dk( rq|j j | � s&t | |j j d� � sy |j j
| � }|j | |�� }|S y )Nz.pyrE ��module_pathr� )�suffix�session�
isinitpath�path_matches_patternsrd �getini�gethookproxy�pytest_pycollect_makemodule)� file_pathr� �ihook�modules rR �pytest_collect_filer� � s{ � ����5� ��~�~�(�(��3�(��6�=�=�/�/��?�� ����+�+�I�6���:�:�!�&� ;�
�� �
�rT c �, � � t � fd�|D � � S )zKReturn whether path matches any of the patterns in the list of globs given.c 3 �6 �K � | ] }t |�� �� � y �w�Nr8 )�.0�patternr� s �rR � <genexpr>z(path_matches_patterns.<locals>.<genexpr>� s �� �� �A�W�z�'�4�(�A�s �)�any)r� �patternss ` rR r� r� � s �� ��A��A�A�ArT �Modulec �0 � t j || �� S )Nr� )r� r� r� s rR r� r� � s � ����f�;��7�7rT c � � t | t t f� sJ t | � � �t |� r+| j ||� rt j
| ||�� S y | j ||� �rt |d|� }t j |� s_t j t |� � sAt |� \ }}t j t d|�d�� d t! |� |dz �� y t |dd� r�t# |� r_t$ j
| |� � }d
|� d�}|j'