
    ?g                       S SK Jr  S SKJr  S SKJr  S SKJr  S SKJr  S SK	J
r
  S SKJr  S SKJr  S S	KJr  S S
KrSS jr\R$                  " SS9      SS j5       r      SS jr        SS jr\R$                  " SS9SS j5       rg
)    )annotations)	Generator)saferepr)Config)ExitCode)Parser)
FixtureDef)
SubRequest)ScopeNc                n    U R                  S5      nUR                  SSSSS9  UR                  SSSS	S9  g )
Ndebugconfigz--setuponlyz--setup-only
store_truez)Only setup fixtures, do not execute tests)actionhelpz--setupshowz--setup-showz,Show setup of fixtures while executing tests)getgroup	addoption)parsergroups     3/usr/lib/python3/dist-packages/_pytest/setuponly.pypytest_addoptionr      sL    OOM*E	OO8	   
OO;	      T)wrapperc              #    #     S v UR                   R                  R                  (       a  [        US5      (       as  U R                  (       aP  [        U R                  5      (       a  U R	                  UR                  5      nO&U R                  UR                     nOUR                  nX l        [        XR                   S5        $ $ ! UR                   R                  R                  (       a  [        US5      (       as  U R                  (       aP  [        U R                  5      (       a  U R	                  UR                  5      nO&U R                  UR                     nOUR                  nX l        [        XR                   S5        f f = f7f)NparamSETUP)
configoption	setupshowhasattridscallabler   param_indexcached_param_show_fixture_action)
fixturedefrequestr   s      r   pytest_fixture_setupr'      s    F>>  **w(( >>
// *w}} = *w/B/B C#MME*/' ^^WE +7>>  **w(( >>
// *w}} = *w/B/B C#MME*/' ^^WE +s   FC CFCF

Fc                    U R                   bS  UR                  nUR                  R                  (       a+  [	        XR                  S5        [        U S5      (       a  U ?g g g g )NTEARDOWNr#   )cached_resultr   r   r   r$   r   r#   )r%   r&   r   s      r   pytest_fixture_post_finalizerr+   5   sV     +=="" ^^ZHz>22+ 3 # ,r   c                J   UR                   R                  S5      nU(       a  UR                  5         UR                  5       nUR	                  5         [        [        [        5      5      R                  U R                  5      nUR                  SU-  5        UR                  SR                  UR                  S5      U R                  S   R                  5       U R                  S95        US:X  aR  [!        S U R"                   5       5      nU(       a/  UR                  S	R                  S
R%                  U5      5      5        ['        U S5      (       a'  UR                  S[)        U R*                  SS9 S35        UR-                  5         U(       a  UR/                  5         g g )Ncapturemanagerz  z{step} {scope} {fixture}   r   )stepscopefixturer   c              3  4   #    U  H  oS :w  d  M
  Uv   M     g7f)r&   N ).0args     r   	<genexpr>'_show_fixture_action.<locals>.<genexpr>U   s     M%8c9<Lcc%8s   		z (fixtures used: {})z, r#   [*   )maxsize])pluginmanager	getpluginsuspend_global_captureget_terminal_writerlinelistreversedr   index_scopewriteformatljustr0   upperargnamesortedargnamesjoinr   r   r#   flushresume_global_capture)r%   r   msgcapmantwscope_indentdepss          r   r$   r$   @   sJ    !!++,<=F%%'		#	#	%BGGI(..z/@/@ALHHW|#$HH"))1""1%++-&& 	* 	
 g~MZ%8%8MMHH+22499T?CDz>**
1Xj55rBC1EFHHJ$$& r   )tryfirstc                \    U R                   R                  (       a  SU R                   l        g )NT)r   	setuponlyr   )r   s    r   pytest_cmdline_mainrW   b   s    }}"&r   )r   r   returnNone)r%   FixtureDef[object]r&   r
   rX   zGenerator[None, object, object])r%   rZ   r&   r
   rX   rY   )r%   rZ   r   r   rO   strrX   rY   )r   r   rX   zint | ExitCode | None)
__future__r   typingr   _pytest._io.safereprr   _pytest.configr   r   _pytest.config.argparsingr   _pytest.fixturesr	   r
   _pytest.scoper   pytestr   hookimplr'   r+   r$   rW   r3   r   r   <module>re      s    "  ) ! # , ' '    F"F-7F$F F*,",-7,	,'"',2'9<'	'D $  r   