j7i dZddlmZddlmZddlmZddlmZedZ eGddeZ e e Z e e Dcic]\}}|| c}}Ze Dcgc]}|e jus|c}Zy cc}}wcc}w) 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. ) annotations)Enum)total_ordering)Literal)sessionpackagemoduleclassfunctionc`eZdZdZdZdZdZdZdZd dZ d dZ d d Z e d dd Z y )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 r r rrcRt|}|dk(rt|dt|dz S)zReturn the next lower scope.rz is the lower-most scope)_SCOPE_INDICES ValueError _ALL_SCOPESselfindexs V/mnt/ssd/data/python-lab/ChefSystem/venv/lib/python3.12/site-packages/_pytest/scope.py next_lowerzScope.next_lower*s5t$ A:v%=>? ?519%%crt|}|ttdz k(rt|dt|dzS)zReturn the next higher scope.rz is the upper-most scope)rlenrrrs r next_higherzScope.next_higher1s@t$ C'!+ +v%=>? ?519%%rc0t|}t|}||kSN)r)rother self_index other_indexs r__lt__z Scope.__lt__8s!#D) $U+ K''rNc ddlm} t|}|S#t$r'|dj ||rd|dnd|dYSwxYw) 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#r rformat)cls scope_namedescrwherer#scopes r from_userzScope.from_user=sd * *%E   9@@uU5'+"j     s ,AA)returnr )rr r/boolr)r* _ScopeNamer+strr,z str | Noner/r )__name__ __module__ __qualname____doc__FunctionClassModulePackageSessionrrr! classmethodr.rrr r sh H E FGG&&( EI#,/8B rr N)r6 __future__renumr functoolsrtypingrr1r listr enumeraterr7 HIGH_SCOPES)rr-xs000rrFs#$H I =D==@5k 3<[3IJ<5%%,J ;Q1ENN#:q; K