bgB dZddlmZddlmZddlmZddlmZerddlm Z e dZ eGdd eZ e e Z d ee DZd e DZd S) a" Scope definition and related utilities. Those are defined here, instead of in the 'fixtures' module because their use is spread across many other pytest modules, and centralizing it in 'fixtures' would cause circular references. Also this makes the module light to import, as it should. )Enum)total_ordering)Optional) TYPE_CHECKING)Literal)sessionpackagemoduleclassfunctionc eZdZUdZdZded<dZded<dZded<d Zded <d Z ded <ddZ ddZ ddd e fdZ e ddddedeed dfdZdS)Scopez Represents one of the possible fixture scopes in pytest. Scopes are ordered from lower to higher, that is: ->>> higher ->>> Function < Class < Module < Package < Session <<<- lower <<<- r _ScopeNameFunctionr Classr Moduler PackagerSessionreturnclt|}|dkrt|dt|dz S)zReturn the next lower scope.rz is the lower-most scope)_SCOPE_INDICES ValueError _ALL_SCOPESselfindexs ^/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/_pytest/scope.py next_lowerzScope.next_lower*s;t$ A::>>>?? ?519%%ct|}|ttdz krt|dt|dzS)zReturn the next higher scope.rz is the upper-most scope)rlenrrrs r next_higherzScope.next_higher1sJt$ C''!+ + +>>>?? ?519%%r othercBt|}t|}||kSN)r)rr$ self_index other_indexs r__lt__z Scope.__lt__8s!#D) $U+ K''r N scope_namedescrwherec ddlm} t|}n:#t$r-|d||rd|dnd|dYnwxYw|S) a Given a scope name from the user, return the equivalent Scope enum. Should be used whenever we want to convert a user provided scope name to its enum object. If the scope name is invalid, construct a user friendly message and call pytest.fail. r)failz'{} {}got an unexpected scope value '{}'zfrom  F)pytrace)_pytest.outcomesr.rrformat)clsr*r+r,r.scopes r from_userzScope.from_user=s *))))) *%%EE    D9@@u<+5++++"j         s4AA)rrr&)__name__ __module__ __qualname____doc__r__annotations__rrrrrr#boolr) classmethodstrrr6r rrrs  (Hl'''!E<!!!#FL###%G\%%%%G\%%%&&&&&&&&(G((((( JN%.1:B3- [r rci|]\}}|| Sr?r?).0rr5s r rBWsJJJ<5%%JJJr c.g|]}|tju|Sr?)rr)rAxs r rE[s$;;;Q1EN#:#:q#:#:#:r N)r:enumr functoolsrtypingrrtyping_extensionsrrrlistr enumerater HIGH_SCOPESr?r rrMs$$$$$$ N))))))LMJ=====D===@d5kk JJ99[3I3IJJJ<;%;;; r