????

Your IP : 3.147.70.194


Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/_pytest/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/_pytest/__pycache__/fixtures.cpython-311.pyc

�

�܋f
����ddlZddlZddlZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZddl
mZddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddl#Z#ddl#m$Z$ddl%m&Z&ddl'm(Z(ddl'm)Z)ddl*m+Z+ddl,m-Z-dd l,m.Z.dd!l,m/Z/dd"l,m0Z0dd#l,m1Z1dd$l,m2Z2dd%l,m3Z3dd&l,m4Z4dd'l,m5Z5dd(l,m6Z6dd)l,m7Z7dd*l,m8Z8dd+l,m9Z9dd,l,m:Z:dd-l;m<Z<dd.l;m=Z=dd/l>m?Z?dd0l@mAZAdd1l@mBZBdd2lCmDZDdd3lCmEZEdd4lFmGZGdd5lHmIZIdd6lHmJZJdd7lHmKZKdd8lLmMZMdd9lLmNZNdd:lOmPZPdd;lOmQZQdd<lRmSZSe rdd=lmTZTdd>lOmUZUdd?lVmWZWdd@lXmYZYddAlXmZZZe!dB��Z[e!dCedDe\f�E��Z]e"edDe[fedDee[ddfffZ^e"ee[e\dfede\eee_e_efffZ`ejadF�G��GdH�dIee[����Zbd�dM�ZcdNe$jddOdPdLee"e$jde$jeffdQ�ZfdNe$jgdReQdLee"e$jde$jeffdS�ZheSeeidTf��ZjdUe$jedVdWdXdYdLdfdZ�Zkd[e\dLed\fd]�Zlee\dDfZmd^e$jddReQdLeemfd_�Znd`ee$jddLee$jdfda�Zod^e$jddbeeQee$jdeemdfffdceeQeemddffdLdfde�Zpd`ee$jddfdbeeQee$jdeemdfffdceeQeemddffdReQdLee$jddff
df�ZqdgdhdLefdi�ZrejaGdj�dk����ZsGdl�dh��Zte0Gdm�dnet����Zue0Gdo�dpev����ZwGdq�dre)��ZxdseidLefdt�ZydudvdgetdLe[fdw�Zzd�dx�Z{dydzd{eid|e=dLd}fd~�Z|e0Gd�d�ee[����Z}dOe}e[dgetdLdvfd��Z~dOe}e[dgeudLe[fd��Zd�ee"eee\eegee\ffdLee"eee\dDfeegee\fffd��Z�d�eee\dLeee\dDffd��Z�d�e]d�d\dLe]fd��Z�e0ejadF�G��Gd��d\������Z�e9dDdDdDdDdDd��d�e]dRd�d�eee\d�e�d�ee"eee\eegee\ffd�eeidLe]fd����Z�e9	d�dDdDdDdDdd��d�ddRd�d�eee\d�e�d�ee"eee\eegee\ffd�eeidLe�fd����Z�	d�d�dd�ddd��d�ee]dRd�d�eee\d�e�d�ee"eee\eegee\ffd�eeidLe"e�e]ffd��Z�	d�d�dd�ddd��d��Z�e�dJ����dgetdLe=fd����Z�d�e?dLdfd��Z�Gd��dY��Z�dS)��N)�defaultdict)�deque)�suppress)�Path)�
TracebackType)�Any)�Callable)�cast)�Dict)�	Generator)�Generic)�Iterable)�Iterator)�List)�MutableMapping)�NoReturn)�Optional)�Sequence)�Set)�Tuple)�Type)�
TYPE_CHECKING)�TypeVar)�Union)�nodes)�getfslineno)�FormattedExcinfo)�TerminalRepr)�TerminalWriter)�_format_args)�_PytestWrapper)�assert_never)�final)�
get_real_func)�get_real_method)�getfuncargnames)�	getimfunc)�getlocation)�is_generator)�NOTSET)�
NotSetType)�overload)�safe_getattr)�
_PluggyPlugin)�Config)�Parser��check_ispytest)�
YIELD_FIXTURE)�Mark)�ParameterSet)�
MarkDecorator��fail)�skip)�TEST_OUTCOME)�absolutepath)�bestrelpath)�HIGH_SCOPES)�Scope)�StashKey)�Deque)�
_ScopeName)�Session)�	CallSpec2)�Metafunc�FixtureValue�FixtureFunction.)�boundT)�frozenc�$�eZdZUded<eed<dS)�PseudoFixtureDefz"_FixtureCachedResult[FixtureValue]�
cached_result�_scopeN)�__name__�
__module__�__qualname__�__annotations__r>���a/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/_pytest/fixtures.pyrJrJjs%�������7�7�7�7��M�M�M�M�MrRrJ�sessionrB�returnc�.�t|��|_dS�N)�FixtureManager�_fixturemanager)rTs rS�pytest_sessionstartrZps��,�W�5�5�G���rR�node�
fixturedef�FixtureDef[object]c���ddlm}|}d�|jd��}|r?t	||��r||jkr$|j}|rt	||���||jk�$|�|jS|S)Nr)�Packagez{}/{}z__init__.py)�_pytest.pythonr_�format�baseid�
isinstance�nodeid�parentrT)r[r\r_�current�fixture_package_names     rS�get_scope_packagerhts���'�&�&�&�&�&�<@�G�"�>�>�*�*;�]�K�K��
�!��w��(�(�!�,@�G�N�,R�,R��.���!��w��(�(�!�,@�G�N�,R�,R����|���NrR�scopec���ddl}|tjur|�tj��S|tjur|�|jj��S|tjur|�|jj��S|tj	ur|�|jj	��S|tj
ur|�|jj
��St|��dS)Nr)
r`r>�Function�	getparentr�Item�Class�python�Moduler_rB�mainr")r[ri�_pytests   rS�get_scope_noders�s�������������~�~�e�j�)�)�)�	�%�+�	�	��~�~�g�n�2�3�3�3�	�%�,�	�	��~�~�g�n�3�4�4�4�	�%�-�	�	��~�~�g�n�4�5�5�5�	�%�-�	�	��~�~�g�l�2�3�3�3��U�����rR�FixtureDef[Any]�	collector�metafuncrD�fixturemanagerrXc��|jdjsdSi}i}|jD]�}|j���D]�\}}||jvsJ�||j|<|�|g��}t|��|j|<|�|��||vr*|j�	|tj��}	|	||<��|j�����|j
}
|���D]�\}}||}	d}|	tjurCt||	��}|�1|	tjurt!|t"jj��sJ�|}|�d}
n"i}|j�t*|��}
|
�||
vr
|
|g|
|<��t-|d|t.|||dd���}|g|
|<|
�||
|<��dS)Nr�F�rwrb�argname�funcri�params�unittest�ids)�_calls�funcargs�itemsr}�
setdefault�len�indices�append�
_arg2scope�getr>rk�clear�_arg2fixturedefsrsrnrcrrrorp�stash�name2pseudofixturedef_key�
FixtureDef�get_direct_param_fixture_func)rurvrw�
arg2params�	arg2scope�callspecr{�argvalue�arg2params_listri�arg2fixturedefs�	valuelistr[�name2pseudofixturedef�defaultr\s                rS�add_funcarg_pseudo_fixture_defr��sC���?�1��&����*,�J�"$�I��O�
"�
"��!)�!2�!8�!8�!:�!:�	+�	+��G�X��(�/�1�1�1�1�'/�H�O�G�$�(�3�3�G�R�@�@�O�(+�O�(<�(<�H��W�%��"�"�8�,�,�,��i�'�'� �+�/�/����H�H��%*�	�'�"������!�!�!�!��/�O�(�.�.�0�0�%<�%<����
�'�"�������&�&�!�)�U�3�3�D��|����+�+�
��w�~�4�1�1�+�+��!���<�$(�!�!�24�G�$(�J�$9�$9�)�7�%�%�!�!�,��<Q�1Q�1Q�(=�g�(F�'G�O�G�$�$�#�-���2���(� ���	�	�	�J�)3�|�O�G�$�$�0�1;�%�g�.��K%<�%<rR�obj�FixtureFunctionMarkerc�`�tttt|dd����S)zJReturn fixturemarker or None if it doesn't exist or raised
    exceptions.�_pytestfixturefunctionN)r
rr�r-)r�s rS�getfixturemarkerr��s/����&�'��S�2�D�9�9���rR�itemc#��K�|tjusJ�	|j}|}t|j�����D]�\}}|j||kr�|tjur||f}ng|tjur|||j	j
f}nI|tjur|||j	f}n0|tjur|j
}|||j	|f}nt|��|V���dS#t$rYdSwxYw)zWReturn list of keys for all parametrized arguments which match
    the specified scope.N)r>rkr��sortedr�r�r�rBr_�pathrerprn�clsr"�AttributeError)r�rir��csr{�param_index�key�item_clss        rS�get_parametrized_fixture_keysr��s2�������&�&�&�&���=��!��%+�2�:�+;�+;�+=�+=�$>�$>�	�	� �G�[��}�W�%��.�.����
�%�%�$�k�2����%�-�'�'���T�Y�-=�>����%�,�&�&���T�Y�7����%�+�%�%��8����T�Y��A����U�#�#�#��I�I�I�I�	�	���
�
�
����
���s�C�
C)�(C)r�c��i}i}tD]w}i}|||<tt��}|||<|D]R}t�t||��d��}|r%|||<|D]}||�|����S�xt�|d��}	tt|	||tj
����SrW)r=rr�dict�fromkeysr�r��list�reorder_items_atscoper>rB)
r��
argkeys_cache�items_by_argkeyri�d�item_dr��keysr��
items_dicts
          rS�
reorder_itemsr�s���EG�M�BD�O��
-�
-��02�� �
�e��0;�E�0B�0B��!'�����	-�	-�D��=�=�!>�t�U�!K�!K�T�R�R�D��
-���$���-�-�C��3�K�&�&�t�,�,�,�,��	-����u�d�+�+�J���j�-��%�-�X�X���rRr�r�zDeque[nodes.Item]c��tD]B}||�|g��D]#}|||�|���$�CdSrW)r=r��
appendleft)r�r�r�rir�s     rS�fix_cache_orderr�'sg��
�9�9�� ��'�+�+�D�"�5�5�	9�	9�C��E�"�3�'�2�2�4�8�8�8�8�	9�9�9rRc�����|tjust���dkr�St���t	���}i}||}||}|�ri}d}	|r�|���}
|
|vs|
|vr�t��fd�|�|
g��D��d��}|sd||
<nd|�	��\}	}�fd�||	D��}
t|
��D](}t|||��|�|���)n|��|r.t||||�����}|D]}
d||
<���|	��|��|S)N�c3�$�K�|]
}|�v�|V��dSrWrQ)�.0�k�ignores  �rS�	<genexpr>z(reorder_items_atscope.<locals>.<genexpr>Fs'�����R�R�q�!�6�/�/��/�/�/�/�R�RrRc���g|]}|�v�|��	SrQrQ)r��ir�s  �rS�
<listcomp>z)reorder_items_atscope.<locals>.<listcomp>Ns%���"�"�"���e���A���rR)r>rkr��setr�popleftr�r�r��popitem�reversedr�r�r��
next_lower�add)r�r�r�ri�items_deque�
items_done�scoped_items_by_argkey�scoped_argkeys_cache�no_argkey_group�slicing_argkeyr��argkeys�_�matching_itemsr�r�s`              @rSr�r�1s�����
�����#�e�*�*�q�.�.���"%�%�%�F���,�,�K�)+�J�,�U�3��(��/��
�#�24�����	��&�&�(�(�D��z�!�!�T�_�%<�%<���m�m�R�R�R�R�0�4�4�T�2�>�>�R�R�R�TX���G��
�(,���%�%�$+�O�O�$5�$5�!���"�"�"�"�5�n�E�"�"�"��"�.�1�1�.�.�A�#�A�}�o�F�F�F��*�*�1�-�-�-�-��'�	�(�	(�3�����AQ�AQ�AS�AS���O�(�
(�
(��#'�
�4� � ��
�
�>�"�"�"�;�#�<�rR�request�FixtureRequestc��|jSrW)�param�r�s rSr�r�_s
���=�rRc��eZdZUdZeedfed<eedfed<eeed<eee	dfed<dd
�Z
d	S)�FuncFixtureInfo)�argnames�initialnames�
names_closure�name2fixturedefs.r�r�r�rtr�rUNc�p�t��}t|j��}|rl|���}||vrR||jvrI|�|��||jvr+|�|j|dj��|�lt||jj	���|jdd�<dS)a�Recompute names_closure from initialnames and name2fixturedefs.

        Can only reduce names_closure, which means that the new closure will
        always be a subset of the old one. The order is preserved.

        This method is needed because direct parametrization may shadow some
        of the fixtures that were included in the originally built dependency
        tree. In this way the dependency tree can get pruned, and the closure
        of argnames may get reduced.
        ���)r�N)
r�r��popr�r�r��updater�r��index)�self�closure�working_setr{s    rS�prune_dependency_treez%FuncFixtureInfo.prune_dependency_treeps��� �E�E���$�+�,�,���
	T�!�o�o�'�'�G��g�%�%�'�T�5G�*G�*G����G�$�$�$��d�3�3�3��&�&�t�'<�W�'E�b�'I�'R�S�S�S��
	T�!'�w�D�4F�4L� M� M� M���1�1�1���rR�rUN)rMrNrO�	__slots__r�strrPrrrr�rQrRrSr�r�cs��������Q�I��C��H�o������S��/�!�!�!���9�����3��):� ;�;�<�<�<�<�N�N�N�N�N�NrRr�c�r�eZdZdZdd�deddfd�Zed-d	���Zedee	fd
���Z
ed���Zde	dd
fd�Zede
fd���Zed���Zed���Zed���Zed���Zedefd���Zedee	effd���Zed.d���Zdegefddfd�Zdee	efddfd�Zdee	de fd�Z!d/d�Z"de	defd�Z#de	ded e$effd!�Z%ded
fd"�Z&d0d$�Z'						d1d'�Z(de	d(e)d)e)ddfd*�Z*dee	fd+�Z+de	fd,�Z,dS)2r�z�A request for a fixture from a test or fixture function.

    A request object gives access to the requesting test context and has
    an optional ``param`` attribute in case the fixture is parametrized
    indirectly.
    F��	_ispytestr�rUNc���t|��||_d|_tj|_i|_|j}|j�	��|_
i|_|jj
|_
|dSrW)r2�_pyfuncitem�fixturenamer>rkrL�
_fixture_defs�_fixtureinfor��copyr��
_arg2indexrTrY)r��
pyfuncitemr��fixtureinfos    rS�__init__zFixtureRequest.__init__�sp���y�!�!�!�%���*.����n���9;���'1�'>�� +� <� A� A� C� C���*,���/9�/A�/Q���	
���rRrAc��|jjS�zIScope string, one of "function", "class", "module", "package", "session".�rL�value�r�s rSrizFixtureRequest.scope�����{� � rRc��t|jjj��}|�t|j���|����|S)z-Names of all active fixtures in this request.)r�r�r�r��extendr�r��
difference)r��results  rS�fixturenameszFixtureRequest.fixturenames�sJ���d�&�3�A�B�B���
�
�c�$�,�-�-�8�8��@�@�A�A�A��
rRc�4�|j}|tjur|j}n>|tjurt|j|j��}nt|j|��}|�|tjur|j}|s#Jd�	||j�����|S)z>Underlying collection node (depends on current request scope).Nz8Could not obtain a node for scope "{}" for function {!r})
rLr>rkr�r_rh�_fixturedefrsrnra)r�rir[s   rSr[zFixtureRequest.node�s�������E�N�"�"�AE�AQ�D�D�
�e�m�
#�
#�%�T�%5�t�7G�H�H�D�D�!�$�"2�E�:�:�D��<�E�U�[�0�0��#�D��	
�	
�O�V�V��4�#�
�
�	
�	
�t��rRr{rtc�p�|j�|d��}|�D|jj�J�|jjj}|j�||��}||j|<|j�|d��dz
}|�|t|��krt||���||j|<||S)Nr�)
r�r�r�rerdrY�getfixturedefsr�r��FixtureLookupError)r�r{�fixturedefs�parentidr�s     rS�_getnextfixturedefz!FixtureRequest._getnextfixturedef�s����+�/�/���>�>�����#�*�6�6�6��'�.�5�H��.�=�=�g�x�P�P�K�.9�D�!�'�*���#�#�G�Q�/�/�!�3����E�6�C��,<�,<�#<�#<�$�W�d�3�3�3�#(���� ��5�!�!rRc��|jjS)z6The pytest config object associated with this request.)r��configr�s rSr
zFixtureRequest.config�s����&�&rRc�`�|jdkrtd|j�d����|jjS)z=Test function object if the request has a per-function scope.�functionzfunction not available in �-scoped context)rir�r�r�r�s rSrzFixtureRequest.function�sA���:��#�#� �H�T�Z�H�H�H���
���#�#rRc��|jdvrtd|j�d����|j�tjj��}|r|jSdS)z:Class (can be None) where the test function was collected.)�classrzcls not available in r
N)rir�r�rlrrrornr�)r��clscols  rSr�zFixtureRequest.cls�sc���:�2�2�2� �!T���!T�!T�!T�U�U�U��!�+�+�G�N�,@�A�A���	��:��	�	rRc��	|jjS#t$r%t|dd��}t|dd��cYSwxYw)z<Instance (can be None) on which test function was collected.rN�__self__)r��	_testcaser��getattr)r�rs  rS�instancezFixtureRequest.instance�sW��	7��#�-�-���	7�	7�	7��t�Z��6�6�H��8�Z��6�6�6�6�6�	7���s��,=�=c��|jdvrtd|j�d����|j�tjj��jS)z;Python module object where the test function was collected.)rr�modulezmodule not available in r
)rir�r�rlrrrorpr�r�s rSrzFixtureRequest.module�sM���:�<�<�<� �!W�D�J�!W�!W�!W�X�X�X���)�)�'�.�*?�@�@�D�DrRc�\�|jdvrtd|j�d����|jjS)z+Path where the test function was collected.)rrr�packagezpath not available in r
)rir�r�r�r�s rSr�zFixtureRequest.paths:���:�G�G�G� �!U�$�*�!U�!U�!U�V�V�V���$�$rRc��|j}|jS)z4Keywords/markers dictionary for the underlying node.)r[�keywords)r�r[s  rSrzFixtureRequest.keywords
s�� �9���}�rRrBc��|jjS)zPytest session object.)r�rTr�s rSrTzFixtureRequest.sessions����'�'rR�	finalizerc�:�|j�|��dS�z�Add finalizer/teardown function to be called without arguments after
        the last test within the requesting test context finished execution.N�r[�addfinalizer�r�rs  rSr!zFixtureRequest.addfinalizers ��	
�	���y�)�)�)�)�)rR�markerc�:�|j�|��dS)a
Apply a marker to a single test function invocation.

        This method is useful if you don't want to have a keyword/marker
        on all function invocations.

        :param marker:
            An object created by a call to ``pytest.mark.NAME(...)``.
        N)r[�
add_marker)r�r#s  rS�applymarkerzFixtureRequest.applymarkers ��	
�	���V�$�$�$�$�$rR�msgc�:�|j�d||���)zqRaise a FixtureLookupError exception.

        :param msg:
            An optional custom error message.
        N)rYr)r�r's  rS�
raiseerrorzFixtureRequest.raiseerror)s���"�5�5�d�D�#�F�F�FrRc��|j}t|d|j��}|D](}||jvr|�|��|j|<�)dS)Nr�)r�rr�r��getfixturevalue)r�r�r�r{s    rS�
_fillfixtureszFixtureRequest._fillfixtures1sc������t�^�T�5F�G�G��#�	G�	G�G��d�m�+�+�)-�)=�)=�g�)F�)F��
�g�&��	G�	GrRc�p�|�|��}|j�Jd|�d����|jdS)a�Dynamically run a named fixture function.

        Declaring fixtures via function argument is recommended where possible.
        But if you can only decide whether to use another fixture at test
        setup time, you may use this function to retrieve it inside a fixture
        or test function body.

        This method can be used during the test setup phase or the test run
        phase, but during the test teardown phase a fixture's value may not
        be available.

        :param argname:
            The fixture name.
        :raises pytest.FixtureLookupError:
            If the given fixture could not be found.
        NzThe fixture value for "zQ" is not available.  This can happen when the fixture has already been torn down.r)�_get_active_fixturedefrK)r�r{r\s   rSr+zFixtureRequest.getfixturevalue8sX��"�0�0��9�9�
��'�3�3�
K�g�
K�
K�
K�4�3�3��'��*�*rRr]c� �	|j|S#t$rS	|�|��}n9#t$r,|dkr$|dgdf}t	|t
j��cYcYS�wxYwYnwxYw|�|��||j|<|S)Nr�r)r��KeyErrorrrrJr>rk�_compute_fixture_value)r�r{r\rKs    rSr.z%FixtureRequest._get_active_fixturedefPs���		��%�g�.�.���	�	�	�
�!�4�4�W�=�=�
�
��%�
�
�
��i�'�'�%)�A�3��$5�M�+�M�5�>�J�J�J�J�J�J�J��	
�����
�	����	
�#�#�J�/�/�/�&0���7�#��s/��
A,�0�A,�0A&� A,�$A&�&A,�+A,c���|}g}t|t��r6|�|j��|j}t|t���6|���|SrW)rc�
SubRequestr�r�_parent_request�reverse)r�rf�valuess   rS�_get_fixturestackz FixtureRequest._get_fixturestackcsf����(*����*�-�-�	.��M�M�'�-�.�.�.��-�G���*�-�-�	.�	�������
rRr\c���|j}|j}|j}	|j}n#t$rd}YnwxYw|�^||jvrU|j|}|j|}tt��5|j	|}ddd��n#1swxYwY�nZt}d}|jdu}t|dd��}	|rG|	rEd�|j
|jt|��j���}
t#|
d���|r�t%j��d}t%j|d��}t+|j��}
|j}	t1|
�|jj����}n#t8$rt1|
��}YnwxYwd	�|j|jt;|j|jj��||��}
t#|
d���t?|||||d
���}|� ||j|��	|�!|���|�"||��dS#|�"||��wxYw)
a+Create a SubRequest based on "self" and call the execute method
        of the given FixtureDef object.

        This will force the FixtureDef object to throw away any previous
        results and compute a new fixture value, which will be stored into
        the FixtureDef object itself.
        Nr�
nofuncargsFzo{name} does not support fixtures, maybe unittest.TestCase subclass?
Node id: {nodeid}
Function type: {typename})�namerd�typename��pytracer�z}The requested fixture has no parameter defined for test:
    {}

Requested fixture '{}' defined in:
{}

Requested here:
{}:{}Tr�r�)#r{r�rLr�r�r}r�rr0r�r*rrar:rd�typerMr8�inspect�stack�getframeinfor;�filename�linenor��relative_tor
�rootpath�
ValueErrorr(r|r3�_check_scope�execute�_schedule_finalizers)r�r\r{�funcitemrir�r�r��
has_params�fixtures_not_supportedr'�frame�	frameinfo�source_path�
source_lineno�source_path_str�
subrequests                 rSr1z%FixtureRequest._compute_fixture_valuels����$���#���!��	��(�H�H���	�	�	��H�H�H�	������G�x��$>�$>��O�G�,�E�"�*�7�3�K��(�#�#�
5�
5� �+�G�4��
5�
5�
5�
5�
5�
5�
5�
5�
5�
5�
5����
5�
5�
5�
5���E��K�#�*�$�6�J�%,�X�|�U�%K�%K�"��

)�4�

)�0��&�!��#�?�!�(�^�^�4����	��S�%�(�(�(�(��
)��
����*��#�0��q��:�:�	�*�9�+=�>�>�� )� 0�
�7�&)�#�/�/���0H�I�I�'�'�O�O��"�7�7�7�&)�+�&6�&6�O�O�O�7����1�28�� ��"�*�#�J�O�X�_�5M�N�N�'�%�2�2�	��S�%�(�(�(�(���%���Z�4�
�
�
�
�
	������e�<�<�<�	>����z��2�2�2��%�%�j�*�=�=�=�=�=��D�%�%�j�*�=�=�=�=���s<��.�.�*B�B�B�,E;�;F�F�I�I#rRr3c�F����j���fd���dS)Nc�0��������S�Nr�)�finish)r\rRs��rS�<lambda>z5FixtureRequest._schedule_finalizers.<locals>.<lambda>�s���Z�->�->�z�->�-R�-R�rRr )r�r\rRs ``rSrIz#FixtureRequest._schedule_finalizers�s/����	��$�$�%R�%R�%R�%R�%R�S�S�S�S�SrR�invoking_scope�requested_scopec
���|dkrdS||krPd�|�����}td|j�d|�d|j�d|��d���dSdS)	Nr��
z'ScopeMismatch: You tried to access the z scoped fixture z with a z, scoped request object, involved factories:
Fr<)�join�_factorytracebackr8r�)r�r{rXrY�texts     rSrGzFixtureRequest._check_scope�s����i����F��O�+�+��9�9�T�3�3�5�5�6�6�D��/�/�:O�/�/�"�/�/�,:�,@�/�/�(,�/�/��	
�
�
�
�
�
�,�+rRc�B�g}|���D]�}|j}t|��\}}t|t��r"|jj}t|j|��}n|}t|��}|�
d||dz|j|fz����|S)Nz%s:%d:  def %s%sr)r7r|rrcrr�rTr<r�r r�rM)	r��linesr\�factory�fsrCrT�p�argss	         rSr]z FixtureRequest._factorytraceback�s������0�0�2�2�		W�		W�J� �o�G�$�W�-�-�J�B���"�d�#�#�
�#'�#3�#;�����b�1�1�������(�(�D��L�L�+�q�&�1�*�g�>N�PT�.U�U�V�V�V�V��rRc��d|jzS)Nz<FixtureRequest for %r>)r[r�s rS�__repr__zFixtureRequest.__repr__�s��(�D�I�6�6rR�rUrA)rUrBr�)r\r]rUN�r\r]rRr3rUN)-rMrNrO�__doc__�boolr��propertyrirr�r�r[rr/r
rr�rrrr�rrrrTr	�objectr!rr6r&rrr)r,r+rJr.r7r1rIr>rGr]rfrQrRrSr�r��s���������9>������$�����*�!�!�!��X�!���d�3�i�����X������X��("�#�"�2C�"�"�"�"�&�'��'�'�'��X�'��$�$��X�$�����X���7�7��X�7��E�E��X�E��%�d�%�%�%��X�%���.��c��2�����X��
�(�(�(��X�(�*�h�r�6�z�&:�*�t�*�*�*�*�	%�%��]�(:�";�	%��	%�	%�	%�	%�G�h�s�m�G��G�G�G�G�G�G�G�G�+�s�+�s�+�+�+�+�0���	�#�%5�f�%=�=�	>�����&�4�(9�#:�����K>�K>�K>�K>�ZT�.�T�<H�T�	
�T�T�T�T�������	�

�����$�4��9�����7�#�7�7�7�7�7�7rRc���eZdZdZdd�dddededed	d
dedd
fd�Zde	fd�Z
degefdd
fd�Z
						d�fd�Z�xZS)r3zJA sub request for handling getting a fixture from a test function/fixture.Fr�r�r�rir�r�r\r]r�rUNc��t|��||_|j|_|tur||_||_||_||_|j	|_	|j
|_
|j|_|j|_|j
|_
dSrW)r2r4r{r�r*r�r�rLrr�r�r�r�rY)r�r�rir�r�r\r�s       rSr�zSubRequest.__init__�s���	�y�!�!�!�&���%�-��������D�J�&������%���"�.���$�2��� '� 8���!�,���&�6����rRc�(�d|j�d|j�d�S)Nz<SubRequest z for �>)r�r�r�s rSrfzSubRequest.__repr__�s!��L�d�.�L�L�t�7G�L�L�L�LrRrc�:�|j�|��dSr)rr!r"s  rSr!zSubRequest.addfinalizers!��	
��%�%�i�0�0�0�0�0rRrRc����|j|jvr3|�tj|jj|�����t���||��dSrU)	r{r�r!�	functools�partialrrV�superrI)r�r\rR�	__class__s   �rSrIzSubRequest._schedule_finalizerssi�����T�%6�6�6��#�#��!�$�"2�"9�4�H�H�H�
�
�
�	���$�$�Z��<�<�<�<�<rRrh)rMrNrOrir>r�intrjr�r�rfr	rlr!rI�
__classcell__)rvs@rSr3r3�s
�������T�T� �7�7�7�!�7��7��	7�
�7�)�
7��7�
�7�7�7�7�0M�#�M�M�M�M�1�h�r�6�z�&:�1�t�1�1�1�1�

=�.�
=�<H�
=�	
�
=�
=�
=�
=�
=�
=�
=�
=�
=�
=rRr3c	�N�eZdZdZ	d
deededeeddfd�Zdd	�ZdS)rz:Could not return a requested fixture (missing or invalid).Nr{r�r'rUc�b�||_||_|���|_||_dSrW)r{r�r7�fixturestackr')r�r{r�r's    rSr�zFixtureLookupError.__init__s1��������#�5�5�7�7�������rR�FixtureLookupErrorReprc��g}|j}|jjjg}|�td�|j����|j}|�
|dd�}|D]�}t|��\}}	tj
t|����\}}	|d|�d|dz����t|��D]P\}
}|�
��}|d|z��|����d��rn�Q��#t t"t$f$rd}||||dzfz��Y��wxYw|��|jj}
t)��}|jjjj}|
j���D]?\}}t3|
�||����}|r|�|���@|j|vrd	�|j��}nd
|j�d�}|d�d
�t?|������z
}|dz
}tA|||||j��S)Nc��|jSrW)r|)�xs rSrWz/FixtureLookupError.formatrepr.<locals>.<lambda>$s��1�6�rRr�zfile z, line rz  �defz+file %s, line %s: source code not availablez5 recursive dependency involving fixture '{}' detectedz	fixture 'z' not foundz
 available fixtures: {}z, z6
 use 'pytest --fixtures [testpath]' for help on them.)!r�r�r�r�r��mapr{r'rr?�getsourcelinesr$�	enumerate�rstrip�lstrip�
startswith�OSError�
IndexError�	TypeErrorrYr�rerdr�r�r��_matchfactoriesr�r{rar\r�r|)r��tblines�addliner@r'r�fspathrCr`r�r��line�	error_msg�fm�	availablerr:r�faclists                   rS�
formatreprzFixtureLookupError.formatrepr s������.����)�-�.��
���S�)�)�4�+<�=�=�>�>�>��h���?��#�2�#�J�E��
	�
	�H�(��2�2�N�F�F�
�"�1�-��2I�2I�J�J���q�
��;��;�;�v��z�;�;�<�<�<�(��/�/���G�A�t��;�;�=�=�D��G�D�4�K�(�(�(��{�{�}�}�/�/��6�6��������Z��3�
:�
:�
:�I�	���	�V�V�a�Z�$8�8�9�9�9�9�9�
:�����;���-�B����I��|�/�6�=�H�%'�%8�%>�%>�%@�%@�
(�
(�!��k��r�1�1�+�x�H�H�I�I���(��M�M�$�'�'�'���|�y�(�(�M�T�T��L�����<�$�,�;�;�;���.�5�5�d�i�i��y�@Q�@Q�6R�6R�S�S�S�C��L�L�C�%�f�f�g�s�D�L�Q�Q�Qs�/$D�,D7�6D7rW)rUr|)	rMrNrOrirr�r�r�r�rQrRrSrrs|������D�D�UY�����}��/=��DL�S�M��	
�����*R�*R�*R�*R�*R�*RrRrc�f�eZdZdeedfdedeededeeddfd	�Zd
e	ddfd�Z
dS)r|rBzos.PathLike[str]�firstlinenor��errorstringr{rUNc�L�||_||_||_||_||_dSrW)r�r�rBr�r{)r�rBr�r�r�r{s      rSr�zFixtureLookupErrorRepr.__init__Ns-�����&��� ��
�&�������rR�twc�@�|jD])}|�|������*|j�d��}|r�|�t
j�d|d�����d���|dd�D]:}|�t
j�d|�����d����;|���|�dtj
|j��|jdzfz��dS)Nr[z       rT)�redrz%s:%d)
r�r�r�r��splitr�fail_marker�strip�flow_marker�osr�rBr�)r�r��tbliner`r�s     rS�
toterminalz!FixtureLookupErrorRepr.toterminal\s+���l�	%�	%�F��G�G�F�M�M�O�O�$�$�$�$�� �&�&�t�,�,���		��G�G�#�/�J�J��a����8H�8H�J�J��
�
�
�
��a�b�b�	�
�
�����'�3�J�J�D�J�J�L�L�J�J�������	���	�	�	�
����2�9�T�]�3�3�T�5E��5I�J�J�K�K�K�K�KrR)rMrNrOrr�rwrrr�rr�rQrRrSr|r|Ms����������/�/�0�����#��	�
���#��
�
�����L�^�L��L�L�L�L�L�LrRr|r'c���t|��\}}|�d|dz��}tj�|��}t	|dzt|�����zdz|zd���dS)N�:rz:

r[Fr<)rrr�_code�Sourcer8r��indent)�fixturefuncr'rbrC�location�sources      rS�fail_fixturefuncr�os{���[�)�)�J�B���#�#�v��z�#�#�H�
�]�
!�
!�+�
.�
.�F���w���V�]�]�_�_�-�-�	-��	4�x�	?��O�O�O�O�O�OrRr��_FixtureFunc[FixtureValue]c��t|��r�ttdttddff|��}|di|��}	t|��}n&#t$rt|j�d���d�wxYwtj
t||��}|�|��n*ttdtf|��}|di|��}|S)N.z did not yield a valuerQ)
r)r
r	rrE�next�
StopIterationrFr�rsrt�_teardown_yield_fixturer!)r�r��kwargs�	generator�fixture_resultrs      rS�call_fixture_funcr�vs���K� � �
/���S�)�L�$��$<�=�=�>��
�
�� �K�)�)�&�)�)�	�	W�!�)�_�_�N�N���	W�	W�	W��� 3�K�K�K�L�L�RV�V�	W�����%�&=�{�I�V�V�	����Y�'�'�'�'��8�C��$5�6��D�D��$��.�.�v�.�.���s�	A�#A<c�h�	t|��t|d��dS#t$rYdSwxYw)z�Execute the teardown of a fixture function by advancing the iterator
    after the yield and ensure the iteration ends (if not it means there is
    more than one yield in the function).z*fixture function has more than one 'yield'N)r�r�r�)r��its  rSr�r��sP��T��R����	��&R�S�S�S�S�S���
�
�
����
���s�#�
1�1�scope_callablez#Callable[[str, Config], _ScopeName]�fixture_namer
rAc��	|||���}n6#t$r)}td�||����|�d}~wwxYwt|t��s&td�|||��d���|S)N)r�r
zqError evaluating {} while defining fixture '{}'.
Expected a function with the signature (*, fixture_name, config)zPExpected {} to return a 'str' while defining fixture '{}', but it returned:
{!r}Fr<)�	Exceptionr�rarcr�r8)r�r�r
r��es     rS�_eval_scope_callabler��s���

� ��\�&�I�I�I���������
O�OU�v���P�P�
�
�
�	����������f�c�"�"�
��
��6�.�,��?�?��	
�	
�	
�	
�
�Ms�
�
A�$>�Ac�Z�eZdZdZ		ddddeededd	d
eedeee	gdfdfdee
ed
edeee
eedfeegeeffddfd�Zedd���Zdegefddfd�Zdeddfd�Zdedefd�Zdedefd�Zdefd�ZdS)r�z%A container for a fixture definition.FNrwrXrbr{r|r�rirAr}r~r.rUc	��||_|pd|_|du|_||_||_|�
t
j}n%t|��rt|||j	��}t|t��r tj|d|j
�d�|���}||_||_||_t#|||���|_||_d|_g|_dS)Nryz	Fixture '�')�descr�where)r:�	is_method)rYrb�has_locationr|r{r>rk�callabler�r
rcr��	from_userrMrLr}rr&r�r~rK�_finalizers)	r�rwrbr{r|rir}r~rs	         rSr�zFixtureDef.__init__�s��� .����l����#�$�.�����	�����=��N�E�E�
�e�_�_�	P�(����9N�O�O�E��e�S�!�!�	��O��9���9�9�9�����E����28������'��7�h�O�O�O��
�!��
�LP���79����rRc��|jjSr�r�r�s rSrizFixtureDef.scope�r�rRrc�:�|j�|��dSrW)r�r�r"s  rSr!zFixtureDef.addfinalizer�s������	�*�*�*�*�*rRr�c��d}	|jrG	|j���}|��n#t$r}|�|}Yd}~nd}~wwxYw|j�G|r|�	|jj}|�||���d|_g|_dS#|jj}|�||���d|_g|_wxYw)N�r\r�)r�r��
BaseExceptionr[�ihook�pytest_fixture_post_finalizerrK)r�r��excr|r�r�s      rSrVzFixtureDef.finish�s����	"��"�
 � ��+�/�/�1�1�D��D�F�F�F�F��$� � � ��{������������	 ����	�"�
 ��
��	�
��L�&�E��/�/�4��/�Q�Q�Q�"&�D��!�D�����
�L�&�E��/�/�4��/�Q�Q�Q�"&�D��!�D��!�!�!�!s/�B
�#0�B
�
A�A�B
�A�B
�
3B=c�:�|jD]b}|�|��}|dkrEt|t��sJ�|�tj|j|������c|�|��}|j	�q|j	d}||urB|j	d�&|j	d\}}}|�
|���|j	d}	|	S|�|��|j	�J�|jj}
|
�
||���}	|	S)Nr�r�r�rr�)r�r.rcr�r!rsrtrV�	cache_keyrK�with_tracebackr[r��pytest_fixture_setup)r�r�r{r\�my_cache_keyr�r��val�tbr�r�s           rSrHzFixtureDef.executes7���}�	Y�	Y�G� �7�7��@�@�J��)�#�#�!�*�j�9�9�9�9�9��'�'�	�(9�$�+�w�(W�(W�(W�X�X�X���~�~�g�.�.����)��*�1�-�I��y�(�(��%�a�(�4�!%�!3�A�!6�J�A�s�B��,�,�R�0�0�0�!�/��2�F�!�M�
�K�K�� � � ��%�-�-�-���"���+�+�t�W�+�M�M���
rRc�>�t|d��s|jn|jS)Nr�)�hasattrr�r�)r�r�s  rSr�zFixtureDef.cache_key0s!��*1�'�7�*C�*C�V�w�"�"���VrRc�N�d�|j|j|j��S)Nz0<FixtureDef argname={!r} scope={!r} baseid={!r}>)rar{rirbr�s rSrfzFixtureDef.__repr__3s'��A�H�H��L�$�*�d�k�
�
�	
rR)FNrg)rMrNrOrirr�rr>r	r/rrlrjrrr�rkrir!r3rVrErHr�rfrQrRrSr�r��s�������/�/��
�=:�=:�(�=:���
�=:��	=:�
+�=:��U�L�(�C��=�,�3N�*O�QU�U�V�
=:���&�)�*�=:��=:���%���(�#�-�.��#����@P�9P�0Q�Q�R�
�=:�
�=:�=:�=:�=:�~�!�!�!��X�!�+�h�r�6�z�&:�+�t�+�+�+�+�"�j�"�T�"�"�"�"�.�z��l�����>W��W��W�W�W�W�
�#�
�
�
�
�
�
rRr�c�R�|j}|jr'|j�|j�|j��}nq|j�jt	|d��r!t|j|jj��s|St|j��}||jkr|�|j��}|S)z�Get the actual callable that can be called to obtain the fixture
    value, dealing with unittest-specific instances and bound methods.Nr)	r|r~r�__get__r�rcrrvr')r\r�r�s   rS�resolve_fixture_functionr�9s���
�/�K���D���'�$�/�1�1�'�2B�C�C�K��
��'��{�J�/�/�
#�
�� �+�"6�"@�9�9�
#�#�"�#�J�O�4�4�K��j�o�-�-�)�1�1�'�2B�C�C���rRc�:�i}|jD]Q}|�|��}|j�J�|j\}}}|�||j|j��|||<�Rt||��}|�|��}		t|||��}n}#t$rptj
��}
|
d�J�t|
dtj
��r'|j�d��s
d|
d_d|	|
f|_�wxYw||	df|_|S)zExecution of fixture setup.Nrr�xunit_setupT)r�r.rKrGrLr�r�r�r:�sys�exc_inforcr9r�rMr��_use_item_location)r\r�r�r{�fixdefr��
arg_cache_keyr�r�r�r�s           rSr�r�TsO���F��&�!�!���/�/��8�8���#�/�/�/�%+�%9�"��
�s����W�g�n�f�m�D�D�D� ��w���*�:�w�?�?�K��'�'��0�0�L�
�"�;���@�@���������<�>�>����{�&�&�&���Q�K���
�
�	2��&�1�1�-�@�@�	2�.2�H�Q�K�*�$(�,��#A�
� �
�����!'��d�;�J���Ms
�B�A:Drc�J�|�dSt|��r|St|��SrW)r��tuple)rs rS�_ensure_immutable_idsr�qs-���{��t���}�}���
���:�:�rRr}c�(�|�t|��ndSrW)r�)r}s rS�_params_converterr�{s��#�.�5��=�=�=�D�8rRr�fixture_markerc����d�|jp|j����tj|���fd���}t|��|_tt|��S)z�Wrap the given fixture function so we can raise an error about it being called directly,
    instead of used as an argument in a test function.asFixture "{name}" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/stable/explanation/fixtures.html for more information about fixtures, and
https://docs.pytest.org/en/stable/deprecations.html#calling-fixtures-directly about how to update your code.�r:c�*��t�d���dS)NFr<r7)rdr��messages  �rSr�z=wrap_function_to_error_out_if_called_directly.<locals>.result�s����W�e�$�$�$�$�$�$rR)	rar:rMrs�wrapsr!�__pytest_wrapped__r
rF)rr�r�r�s   @rS�-wrap_function_to_error_out_if_called_directlyr��s|���	w�
�f�.�%�:��):�f�;�;���_�X���%�%�%�%���%�
!/�x� 8� 8�F�����(�(�(rRc��eZdZUded<eeedfed<dZeed<dZ	ee
eeedfeegeeffed<dZ
eeed	<dZejeed
<d
eddfd�Zd
edefd�ZdS)r��6Union[_ScopeName, Callable[[str, Config], _ScopeName]]ri.r}F�autouseNrr:r�rUc�$�t|��dSrWr1)r�r�s  rS�
__post_init__z#FixtureFunctionMarker.__post_init__�s���y�!�!�!�!�!rRrc�H�tj|��rtd���t|dd��rtd���t	||��}|jp|j}|dkr3t|��}td�	|��d���||_
|S)Nz2class fixtures not supported (maybe in the future)r�Fz<fixture is being applied more than once to the same functionr�zA'request' is a reserved word for fixtures, use another name:
  {}r<)r?�isclassrFrr�r:rMr(r8rar�)r�rr:r�s    rS�__call__zFixtureFunctionMarker.__call__�s����?�8�$�$�	S��Q�R�R�R��8�5�u�=�=�	��N���
�A��4�P�P���y�-�H�-���9���"�8�,�,�H��T�[�[�����	
�
�
�
�+/��'��rR)rMrNrOrPrrrlr�rjrrr	rr:r�r��dataclasses�InitVarr�rFr�rQrRrSr�r��s�������D�C�C�C��U�6�3�;�'�(�(�(�(��G�T����	
���
�e�H�V�$�c�)�*�H�c�U�H�V�<L�5L�,M�M�N�
�
�
�
��D�(�3�-����+0�I�{�"�4�(�0�0�0�"�t�"��"�"�"�"����_������rR�rir}r�rr:�fixture_functionr�r�r:c��dSrWrQ�r�rir}r�rr:s      rS�fixturer���	���CrRc��dSrWrQr�s      rSr�r��r�rRFc��t||�t|��nd||�dnt|��r|nt|��|d���}|r||��S|S)a�Decorator to mark a fixture factory function.

    This decorator can be used, with or without parameters, to define a
    fixture function.

    The name of the fixture function can later be referenced to cause its
    invocation ahead of running tests: test modules or classes can use the
    ``pytest.mark.usefixtures(fixturename)`` marker.

    Test functions can directly use fixture names as input arguments in which
    case the fixture instance returned from the fixture function will be
    injected.

    Fixtures can provide their values to test functions using ``return`` or
    ``yield`` statements. When using ``yield`` the code block after the
    ``yield`` statement is executed as teardown code regardless of the test
    outcome, and must yield exactly once.

    :param scope:
        The scope for which this fixture is shared; one of ``"function"``
        (default), ``"class"``, ``"module"``, ``"package"`` or ``"session"``.

        This parameter may also be a callable which receives ``(fixture_name, config)``
        as parameters, and must return a ``str`` with one of the values mentioned above.

        See :ref:`dynamic scope` in the docs for more information.

    :param params:
        An optional list of parameters which will cause multiple invocations
        of the fixture function and all of the tests using it. The current
        parameter is available in ``request.param``.

    :param autouse:
        If True, the fixture func is activated for all tests that can see it.
        If False (the default), an explicit reference is needed to activate
        the fixture.

    :param ids:
        Sequence of ids each corresponding to the params so that they are
        part of the test id. If no ids are provided they will be generated
        automatically from the params.

    :param name:
        The name of the fixture. This defaults to the name of the decorated
        function. If a fixture is used in the same module in which it is
        defined, the function name of the fixture will be shadowed by the
        function arg that requests the fixture; one way to resolve this is to
        name the decorated function ``fixture_<fixturename>`` and then use
        ``@pytest.fixture(name='<fixturename>')``.
    NT)rir}r�rr:r�)r�r�r�)r�rir}r�rr:r�s       rSr�r��sx��z+�� &� 2�u�V�}�}�}����K�D�D�H�S�M�M�%I�S�S�u�S�z�z�
��
���N��0��~�.�/�/�/��rRc	�`�tjtd���t|g|�R|||||d��S)z�(Return a) decorator to mark a yield-fixture factory function.

    .. deprecated:: 3.0
        Use :py:func:`pytest.fixture` directly instead.
    r�)�
stacklevelr�)�warnings�warnr3r�)r�rir}r�rr:rds       rS�
yield_fixturer.sV��
�M�-�A�.�.�.�.����	
�������
����rR)ric��|jS)z�Session-scoped fixture that returns the session's :class:`pytest.Config`
    object.

    Example::

        def test_foo(pytestconfig):
            if pytestconfig.getoption("verbose") > 0:
                ...

    )r
r�s rS�pytestconfigrHs���>�rR�parserc�8�|�ddgd���dS)N�usefixturesrdz5List of default fixtures to be used with this project)r>r��help)�addini)r	s rS�pytest_addoptionrWs3��
�M�M��
��
D�	�����rRc��eZdZdZeZeZd&d�Zdejde	e
fd�Z	d'dejd
ede
fd�Zdeddfd
�Zde
dee
fd�Z	d(dee
dfdejdee
deee
dfe	e
ee
eeefffd�Zd)d�Zde	ejddfd�Zedd�dejdeddfd���Zedd�dedee
deddfd���Ze fd d�de!ejefde!e
e"dfdeddfd!�Zd"e
de
deeeefd#�Z#d$e$eede
deeefd%�Z%dS)*rXa�pytest fixture definitions and information is stored and managed
    from this class.

    During collection fm.parsefactories() is called multiple times to parse
    fixture function definitions into FixtureDef objects and internal
    data structures.

    During collection of test functions, metafunc-mechanics instantiate
    a FuncFixtureInfo object which is cached per node/func-name.
    This FuncFixtureInfo object is later retrieved by Function nodes
    which themselves offer a fixturenames attribute.

    The FuncFixtureInfo object holds information about fixtures and FixtureDefs
    relevant for a particular function. An initial list of fixtures is
    assembled like this:

    - ini-defined usefixtures
    - autouse-marked fixtures along the collection chain up from the function
    - usefixtures markers at module/class/function level
    - test function funcargs

    Subsequently the funcfixtureinfo.fixturenames attribute is computed
    as the closure of the fixtures needed to setup the initial fixtures,
    i.e. fixtures needed by fixture functions themselves are appended
    to the fixturenames list.

    Upon the test-setup phases all fixturenames are instantiated, retrieved
    by a lookup of their FuncFixtureInfo.
    rTrBrUNc���||_|j|_i|_t��|_d|j�d��i|_|jj�|d��dS)Nryr�
funcmanage)	rTr
r�r��_holderobjseen�getini�_nodeid_autousenames�
pluginmanager�register)r�rTs  rSr�zFixtureManager.__init__�sj�����%�n���BD���+.�5�5���
���"�"�=�1�1�;
��!�	��$�-�-�d�L�A�A�A�A�ArRr[c���g}|�d���D]P}|j�dd��s3tj|ji|j��\}}|�|���Q|S)a!Return all direct parametrization arguments of a node, so we don't
        mistake them for fixtures.

        Check https://github.com/pytest-dev/pytest/issues/5036.

        These things are done later as well when dealing with parametrization
        so this could be improved.
        �parametrizer��indirectF)�iter_markersr�r�r5�_parse_parametrize_argsrdr�)r�r[�parametrize_argnamesr#�
p_argnamesr�s      rS�_get_direct_parametrize_argsz+FixtureManager._get_direct_parametrize_args�s���+-���'�'�]�'�;�;�	8�	8�F��=�$�$�Z��7�7�
8� ,� D��[�!�$*�M�!�!�
�
�A�%�+�+�J�7�7�7��#�#rRTr�c�Z�|r)t|dd��st||j|���}nd}td�|�d���D����}||z}|jj}|�|||�|�����\}}	}
t|||	|
��S)	Nr9F)r:r�rQc3�.K�|]}|jD]}|V���dSrW)rd)r��mark�args   rSr�z0FixtureManager.getfixtureinfo.<locals>.<genexpr>�sI����
�
��T�Y�
�
�FI�C�
�
�
�
�
�
�
rRrr�)�ignore_args)
rr&r:r�rrTrY�getfixtureclosurerr�)r�r[r|r�r�r�rr�r�r�r�s           rS�getfixtureinfozFixtureManager.getfixtureinfo�s����	�G�D�,��>�>�	�&�t�$�)��E�E�E�H�H��H��
�
� �-�-�=�-�A�A�
�
�
�
�
��#�X�-��
�\�
)��79�7K�7K��$�D�,M�,M�d�,S�,S�8L�8
�8
�4��m�_��x��}�o�V�V�VrR�pluginc���d}	t|j��}|j�d��r�	t	|j�|jj����}n#t$rd}YnwxYw|dkrd}tjtj
kr*|�tjtj
��}n#t$rYnwxYw|�||��dS)Nzconftest.pyry�.)r;�__file__r:r�r�rerDr
rErFr��sepr�SEP�replacer��parsefactories)r�r&rdrcs    rS�pytest_plugin_registeredz'FixtureManager.pytest_plugin_registered�s�����	?��V�_�-�-�A��v� � ��/�/�
?� � ���!5�!5�d�k�6J�!K�!K�L�L�F�F��!� � � ��F�F�F� �����S�=�=��F��6�U�Y�&�&�#�^�^�B�F�E�I�>�>�F����	�	�	��D�	���� 	
���F�F�+�+�+�+�+s"�C�1A%�%A4�3A4�
C�Crdc#�K�tj|��D]&}|j�|��}|r|Ed{V���'dS)z:Return the names of autouse fixtures applicable to nodeid.N)r�iterparentnodeidsrr�)r�rd�parentnodeid�	basenamess    rS�_getautousenameszFixtureManager._getautousenames�sa����!�3�F�;�;�	%�	%�L��1�5�5�l�C�C�I��
%�$�$�$�$�$�$�$�$��	%�	%rRrQr�.�
parentnoder#c����|j}t|�|�����dttddf�fd�}||��t���}i�d}|t
���krdt
���}�D]?}||vr�|�vr�|�||��}	|	r|	�|<||	dj���@|t
���k�ddtdtf�fd�}
��
|
d���|��fS)	N�	otherlistrUc�D��|D]}|�vr��|���dSrW)r�)r6r"�fixturenames_closures  �rS�mergez/FixtureManager.getfixtureclosure.<locals>.merge�s=��� �
5�
5���2�2�2�(�/�/��4�4�4��
5�
5rRr��arg_namec�h��	�|}|djS#t$rtjcYSwxYw)Nr�)rLr0r>rk)r:rr�s  �rS�
sort_by_scopez7FixtureManager.getfixtureclosure.<locals>.sort_by_scope�sL���
.�-�h�7��#�2��-�-���
&�
&�
&��~�%�%�%�
&���s��1�1T)r�r5)rdr�r3rr�r�r�rr�r>�sort)
r�r�r4r#rr9r��lastlenr{rr<r�r8s
           @@rSr$z FixtureManager.getfixtureclosure�s}�����$��#�D�$9�$9�(�$C�$C�D�D��	5�X�c�]�	5�t�	5�	5�	5�	5�	5�	5�
	��l����
�1�2�2��@B������1�2�2�2�2��.�/�/�G�/�
4�
4���k�)�)���o�-�-��"�1�1�'�8�D�D���4�/:�O�G�,��E�+�b�/�2�3�3�3����1�2�2�2�2�	.�C�	.�E�	.�	.�	.�	.�	.�	.�	�!�!�m�T�!�B�B�B��1�?�B�BrRrvrDc	����dtdttfd��|jD]��|j����}|s�t
��fd�|j�d��D����r�Tt|��D]?}|j
�+|��|j
d|j|j
���n�|jvrn�@��dS)	zLGenerate new tests based on parametrized fixtures used by the given metafuncr!rUc�B�tj|ji|j��\}}|SrW)r5rrdr�)r!rdr�s   rS�get_parametrize_mark_argnameszKFixtureManager.pytest_generate_tests.<locals>.get_parametrize_mark_argnamess$��"�:�D�I�U���U�U�G�D�!��KrRc3�2�K�|]}��|��vV��dSrWrQ)r�r!r{rAs  ��rSr�z7FixtureManager.pytest_generate_tests.<locals>.<genexpr>sH���������8�8��>�>�>������rRrNT)rrir)r4rr�r�r�r��any�
definitionrr�r}rrirr�)r�rv�fixture_defsr\r{rAs    @@rS�pytest_generate_testsz$FixtureManager.pytest_generate_testss9����	��	��#��	�	�	�	� �,�"	�"	�G�#�4�8�8��A�A�L��
��������$�/�<�<�]�K�K������
��'�|�4�4�
�
�
��$�0��(�(��"�)�!%�(�.�&�N�)�����E��*�"5�5�5��E�6��C"	�"	rRr�c�.�t|��|dd�<dSrW)r�)r�r�s  rS�pytest_collection_modifyitemsz,FixtureManager.pytest_collection_modifyitems1s�� ��'�'��a�a�a���rR)r~�node_or_objr~c��t���rW��NotImplementedError)r�rIr~s   rSr-zFixtureManager.parsefactories5s��"�#�#�#rRc��t���rWrK)r�rIrdr~s    rSr-zFixtureManager.parsefactories>s��"�#�#�#rRFc���|tur|}nYt|tj��sJ�t	t
|j��}t|jt��sJ�|j}||j	vrdS|j	�
|��g}t|��D�]!}t|tj��r|dkr�$t||d��}t|��}t|t��s�Z|jr|j}t!||��}t#|||||j|j||j���}	|j�|g��}
|	jr|
�|	��n/t3d�|
D����}|
�||	��|jr|�|����#|r2|j�|pdg���|��dSdS)awCollect fixtures from a collection node or object.

        Found fixtures are parsed into `FixtureDef`s and saved.

        If `node_or_object` is a collection node (with an underlying Python
        object), the node's object is traversed and the node's nodeid is used to
        determine the fixtures' visibilty. `nodeid` must not be specified in
        this case.

        If `node_or_object` is an object (e.g. a plugin), the object is
        traversed and the given `nodeid` is used to determine the fixtures'
        visibility. `nodeid` must be specified in this case; None and "" mean
        total visibility.
        Nr�rzc� �g|]}|j�	|��SrQ)r�)r��fs  rSr�z1FixtureManager.parsefactories.<locals>.<listcomp>�s��B�B�B�q�1�>�B��B�B�BrRry)r*rcr�Noder
rlr�rdr�rr��dirr-r�r�r:r%r�rir}rr�r�r�r�r��insertr�rr�)r�rIrdr~�	holderobj�autousenamesr:r�r#�fixture_defr�r�s            rSr-zFixtureManager.parsefactoriesHs$��*����#�I�I��k�5�:�6�6�6�6�6��V�[�_�5�5�I��k�0�#�6�6�6�6�6� �'�F���+�+�+��F�����	�*�*�*����	�N�N�.	*�.	*�D��)�U�Z�0�0�
�T�X�5E�5E���y�$��5�5�C�%�c�*�*�F��f�&;�<�<�
���{�
#��{��"�#�y�1�1�C�$�#�����l��}�!��J�	�	�	�K��+�6�6�t�R�@�@�G��'�
/����{�+�+�+�+��B�B�G�B�B�B�C�C�����q�+�.�.�.��~�
*��#�#�D�)�)�)���	X��%�0�0���2�r�B�B�I�I�,�W�W�W�W�W�	X�	XrRr{c��	|j|}n#t$rYdSwxYwt|�||����S)z�Get a list of fixtures which are applicable to the given node id.

        :param str argname: Name of the fixture to search for.
        :param str nodeid: Full node id of the requesting test.
        :rtype: Sequence[FixtureDef]
        N)r�r0r�r�)r�r{rdrs    rSrzFixtureManager.getfixturedefs�sV��	��/��8�K�K���	�	�	��4�4�	�����T�)�)�+�v�>�>�?�?�?s�
�
�rc#�pK�ttj|����}|D]}|j|vr|V��dSrW)r�rr0rb)r�rrd�
parentnodeidsr\s     rSr�zFixtureManager._matchfactories�sT�����E�3�F�;�;�<�<�
�%�	!�	!�J�� �M�1�1� � � � ��	!�	!rR�rTrBrUN)T)rQ)rvrDrUN)&rMrNrOrirr|r�rrQrr�rrjr�r%r.r.rr3rrrr�rr$rFrmrHr,r-rlrr*rr+rrr�rQrRrSrXrX`sa��������<,��3��	B�	B�	B�	B�$���$��S�	�$�$�$�$�(=A�W�W��J�W�59�W�	�W�W�W�W�$,�}�,��,�,�,�,�,%�s�%�x��}�%�%�%�%�&(�	3C�3C��C��H�o�3C��J�3C��c�]�	3C�

�u�S�#�X���S�	�4��X�j��o�5N�0N�+O�O�	P�3C�3C�3C�3C�j)�)�)�)�Z(�4��
�3C�(��(�(�(�(��
�	$�$�$��Z�$��	$�

�$�$�$��X�$���$�$�$��$���
�$�
�$�
�
$�$�$��X�$�06�RX�
�RX�RX�RX��5�:�v�-�.�RX��c�:�t�+�,�RX�
�RX�
�
RX�RX�RX�RX�h
@��
@�$'�
@�	�(�:�c�?�+�	,�
@�
@�
@�
@�!�#�J�s�O�4�!�>A�!�	�*�S�/�	"�!�!�!�!�!�!rRrZr�).rW)�r�rsr?r�r�r�collectionsrr�
contextlibr�pathlibr�typesr�typingrr	r
rrr
rrrrrrrrrrrrrrrr�
_pytest._coder�_pytest._code.coderr�_pytest._ior�_pytest.compatr r!r"r#r$r%r&r'r(r)r*r+r,r-�_pytest.configr.r/�_pytest.config.argparsingr0�_pytest.deprecatedr2r3�_pytest.markr4r5�_pytest.mark.structuresr6�_pytest.outcomesr8r9r:�_pytest.pathlibr;r<�
_pytest.scoper=r>�
_pytest.stashr?r@rA�_pytest.mainrBr`rCrDrErlrF�_FixtureFuncr��_FixtureCachedResult�	dataclassrJrZrm�	CollectorrhrQrsr�r�r�r��_Keyr�r�r�r�r�r�r�r3�LookupErrorrr|r�r�r�r�r�r�r�r�r�r�r�rjr�rrrrXrQrRrS�<module>rtsO��������������	�	�	�	�
�
�
�
�����#�#�#�#�#�#�������������������������������������������������������������������������������!�!�!�!�!�!������������������������������������� � � � � � �����������������������%�%�%�%�%�%�/�/�/�/�/�/�+�+�+�+�+�+�&�&�&�&�&�&�'�'�'�'�'�'�)�)�)�)�)�)�'�'�'�'�'�'� � � � � � �(�(�(�(�(�(�*�*�*�*�*�*�*�*�*�*�*�*�$�$�$�$�$�$�&�&�&�&�&�&�'�'�'�'�'�'�!�!�!�!�!�!�%�%�%�%�%�%�#�#�#�#�#�#�'�'�'�'�'�'�(�(�(�(�(�(�!�!�!�!�!�!�,�,�,�,�,�,�-�-�-�-�-�-�,�,�,�,�,�,�������%�%�%�%�%�%�1�1�1�1�1�1�!�!�!�!�!�!�!�!�!�!�!�!�)�)�)�)�)�)�(�(�(�(�(�(�'�'�'�'�'�'�%�%�%�%�%�%�������"�"�"�"�"�"��(�������(�(�(�(�(�(�$�$�$�$�$�$�(�(�(�(�(�(�'�'�'�'�'�'��w�~�&�&���'�+�8�C��K�3H�I�I�I����S�,�
���#�y��t�T�9Q�/R�*R�!S�S����	����	��
���
�d�=�!�=�-�?�@�		B��
���$���d�#�#�#������w�|�,���$�#��
6�6�6�6��
�*��$���e�E�J���/�0�1�����"�
�*��"��
�e�E�J���/�0�1�����(C�H�T�#�/@�*@�%A�B�D�D��C<���C<�*4�C<�FV�C<�	�C<�C<�C<�C<�L�&��X�.E�%F�����
�V�S�[�����
��5��X�d�^�����H��%�*�-��$�u�z�2B�����(9�
�*�9���t�E�J��T�4�Z�0@�$@�A�A�B�9��%��d�,?�&?�!@�@�A�9�
�	9�9�9�9�+���
�D� �!�+���t�E�J��T�4�Z�0@�$@�A�A�B�+��%��d�,?�&?�!@�@�A�+��	+�

�%�*�d�
��+�+�+�+�\�+;�������
��%N�%N�%N�%N�%N�%N�%N���%N�PT7�T7�T7�T7�T7�T7�T7�T7�n
�-=�-=�-=�-=�-=��-=�-=���-=�`�5R�5R�5R�5R�5R��5R�5R���5R�pL�L�L�L�L�\�L�L�L�DP�s�P�x�P�P�P�P��-��8F�������(	T�	T�	T�	T��9����
���	����2�F
�F
�F
�F
�F
���&�F
�F
���F
�R��<�(��3A��!�����6��<�(��3=�������:�	�%���&�!1�2�H�c�U�H�V�DT�=T�4U�U�V�	W��
�e�E�(�6�*�C�/�0�(�C�5�(�6�BR�;R�2S�S�T�U�����9��X�f�%�&�9�
�e�F�C�K� �!�9�9�9�9�)��)�+�)��)�)�)�)�0����d�#�#�#�%�%�%�%�%�%�%�$�#���%�P
�GJ�),��	�����%��D��
�X�f�%�&�	�
��
�
�h�x��'�(�(�C�5�(�6�:J�3J�*K�K�L�
�
��3�-������
���
� ��GJ�),��	�������D��
�X�f�%�&�	�
��
�
�h�x��'�(�(�C�5�(�6�:J�3J�*K�K�L�
�
��3�-������
���37�J�GQ�)-��	
��J�J�J���/�J�D�J�
�X�f�%�&�	J�
�J�
�
�h�x��'�(�(�C�5�(�6�:J�3J�*K�K�L�
�
J��3�-�J�� �/�1�2�J�J�J�J�\������	
������4	��y�����.��V��������V�������Q!�Q!�Q!�Q!�Q!�Q!�Q!�Q!�Q!�Q!rR