관리-도구
편집 파일: python.cpython-311.pyc
� �܋f� � � � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl mZ ddl mZ ddl mZ ddlmZ ddlmZ ddlmZ dd lmZ dd lmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddl!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&l/m7Z7 dd'l/m8Z8 dd(l/m9Z9 dd)l/m:Z: dd*l/m;Z; dd+l/m<Z< dd,l/m=Z= dd-l>m?Z? dd.l>m@Z@ dd/l>mAZA dd0lBmCZC dd1lDmEZE dd2lDmFZF dd3lDmGZG dd4lHmIZI dd5lJmKZK dd6lLmMZM dd7lLmNZN dd8lOmPZP dd9lOmQZQ dd:lOmRZR dd;lOmSZS dd<lTmUZU dd=lTmVZV dd>lWmXZX dd?lWmYZY dd@lWmZZZ ddAlWm[Z[ ddBlWm\Z\ ddClWm]Z] ddDl^m_Z_ ddEl`maZa ddFl`mbZb ddGl`mcZc erddHldmeZe ddIl^mfZf ee!jg � � jh ZidJeCdKdfdL�ZjdMe?dKee eke@f fdN�Zld�dQ�ZmdMe?dKdfdR�ZndSeodKdfdT�Zp eAdU�V� � dWdXdKeeq fdY�� � ZrdZed[e#js dKed\ fd]�Ztd^ed_eeo dKeufd`�ZvdaedKd\fdb�Zw eAdU�V� � dce dd deeodfeqdKe de#jx e#js ee e#jx e#js f f fdg�� � Zy G dh� die#jz � � Z{ G dj� dk� � Z|e}�~ e}� � e ej� dl� � � � h dm� ee|� � e e|� � � � � � Z�[| G dn� doe{e#js � � Z� G dp� d\e#j� e�� � Z� G dq� dre�� � Z�d�ds�Z�dfeqdteeo dKeeq fdu�Z� G dv� dwe�� � Z� G dx� dy� � Z�deeodKeqfdz�Z�dfeqdKeufd{�Z�dfeqdKeufd|�Z�e2 ej� dU�}� � G d~� d� � � � � � Z�e2 ej� dU�}� � G d�� d�� � � � � � Z�e2 G d�� dP� � � � Z�d�eeo d�eeoee"j� eq f d�e eueeo f dKe_fd��Z�d�e eoe�f dMee? dKeofd��Z�dKeofd��Z�d�� Z�dMe?d�eKdKdfd��Z�dMe?dKe eke@f fd��Z�dMe?d�eKdKdfd��Z�d�d�e,d�eod�eodKdfd��Z� G d�� dXe{e#jx � � Z� G d�� d�e�� � Z�dS )�z7Python test discovery, setup and run of test functions.� N)�Counter)�defaultdict)�partial)�Path)�Any)�Callable)�Dict)� Generator)�Iterable)�Iterator)�List)�Mapping)�Optional)�Pattern)�Sequence)�Set)�Tuple)� TYPE_CHECKING)�Union)�fixtures)�nodes)�filter_traceback)�getfslineno)� ExceptionInfo)�TerminalRepr)� Traceback)�TerminalWriter)�saferepr)� ascii_escaped)�assert_never)�final)�get_default_arg_names)� get_real_func)� getimfunc)�getlocation)�is_async_function)�is_generator)�LEGACY_PATH)�NOTSET��safe_getattr)�safe_isclass)�STRING_TYPES)�Config)�ExitCode)�hookimpl)�Parser)�check_ispytest)�INSTANCE_COLLECTOR)�NOSE_SUPPORT_METHOD)�FuncFixtureInfo)�Session)�MARK_GEN)�ParameterSet)�get_unpacked_marks)�Mark)� MarkDecorator)�normalize_mark_list)�fail)�skip)�bestrelpath�� fnmatch_ex)�import_path)�ImportPathMismatchError)�parts)�visit)�Scope)�PytestCollectionWarning)�PytestReturnNotNoneWarning)�PytestUnhandledCoroutineWarning)�Literal)� _ScopeName�parser�returnc �j � | � d� � }|� dddddd�� � |� d dd dd�� � | � dd ddgd�� � | � dd dgd�� � | � dd dgd�� � | � dddd�� � d S )N�generalz --fixturesz --funcargs� store_true�showfixturesFziShow available fixtures, sorted by plugin appearance (fixtures with leading '_' are only shown with '-v'))�action�dest�default�helpz--fixtures-per-test�show_fixtures_per_testzShow fixtures per test�python_files�argsz test_*.pyz *_test.pyz9Glob-style file patterns for Python test module discovery)�typerT rU �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�boolzcDisable string escape non-ASCII characters, might cause unwanted side effects(use at your own risk))�getgroup� addoption�addini)rL �groups �_/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/_pytest/python.py�pytest_addoptionre \ s' � ��O�O�I�&�&�E� �O�O���� ��?� � � � � �O�O��� %�� %� � � � � �M�M�� ��k�*� H� � � � � �M�M�� ��� E� � � � � �M�M�� ��� S� � � � � �M�M�N� ��-� � � � � � � �configc �z � | j j rt | � � dS | j j rt | � � dS d S )Nr )�optionrQ rV �rg s rd �pytest_cmdline_mainrk � sG � � �}�!� ��V�����q� �}�+� ��v�&�&�&��q��4rf �metafunc�Metafuncc �x � | j � d�� � D ]} | j |j i |j �d|i�� �d S )N�parametrize��name�_param_mark)� definition�iter_markersro rX �kwargs)rl �markers rd �pytest_generate_testsrw � s] � ��%�2�2� �2�F�F� P� P�����f�k�O�V�]�O�O��O�O�O�O�O�P� Prf c �^ � | � dd� � | � dd� � d S )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_linerj s rd �pytest_configurer{ � sO � � ���� � � � � ���� S�� � � � rf �nodeidc �� � d}|dz }|dz }|dz }|dz }|dz }|dz }t j t |� | � � � � � � t d� � � d S ) 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�warnrI �formatr>