/
usr
/
lib
/
imh-dnskeyapi
/
venv
/
lib
/
python3.13
/
site-packages
/
_pytest
/
/usr/lib/imh-dnskeyapi/venv/lib/python3.13/site-packages/_pytest
mkdir
upload
Name
Size
Mode
Actions
assertion/
-
0755
rm
config/
-
0755
rm
mark/
-
0755
rm
_code/
-
0755
rm
_io/
-
0755
rm
_py/
-
0755
rm
cacheprovider.py
22373
0644
edit
dl
rm
capture.py
35330
0644
edit
dl
rm
compat.py
11467
0644
edit
dl
rm
debugging.py
13260
0644
edit
dl
rm
deprecated.py
3147
0644
edit
dl
rm
doctest.py
26255
0644
edit
dl
rm
faulthandler.py
3674
0644
edit
dl
rm
fixtures.py
73550
0644
edit
dl
rm
freeze_support.py
1291
0644
edit
dl
rm
helpconfig.py
8895
0644
edit
dl
rm
hookspec.py
42831
0644
edit
dl
rm
junitxml.py
25574
0644
edit
dl
rm
legacypath.py
16588
0644
edit
dl
rm
logging.py
35124
0644
edit
dl
rm
main.py
37416
0644
edit
dl
rm
monkeypatch.py
14598
0644
edit
dl
rm
nodes.py
26483
0644
edit
dl
rm
outcomes.py
10532
0644
edit
dl
rm
pastebin.py
3978
0644
edit
dl
rm
pathlib.py
37569
0644
edit
dl
rm
py.typed
0
0644
edit
dl
rm
pytester.py
61552
0644
edit
dl
rm
pytester_assertions.py
2244
0644
edit
dl
rm
python.py
64851
0644
edit
dl
rm
python_api.py
40122
0644
edit
dl
rm
python_path.py
745
0644
edit
dl
rm
recwarn.py
13227
0644
edit
dl
rm
reports.py
21331
0644
edit
dl
rm
runner.py
19436
0644
edit
dl
rm
scope.py
2798
0644
edit
dl
rm
setuponly.py
3306
0644
edit
dl
rm
setupplan.py
1184
0644
edit
dl
rm
skipping.py
10217
0644
edit
dl
rm
stash.py
3090
0644
edit
dl
rm
stepwise.py
4596
0644
edit
dl
rm
terminal.py
57393
0644
edit
dl
rm
threadexception.py
3005
0644
edit
dl
rm
timing.py
413
0644
edit
dl
rm
tmpdir.py
11375
0644
edit
dl
rm
unittest.py
15614
0644
edit
dl
rm
unraisableexception.py
3252
0644
edit
dl
rm
warnings.py
5211
0644
edit
dl
rm
warning_types.py
4388
0644
edit
dl
rm
_argcomplete.py
3776
0644
edit
dl
rm
_version.py
511
0644
edit
dl
rm
__init__.py
391
0644
edit
dl
rm
Edit:
/usr/lib/imh-dnskeyapi/venv/lib/python3.13/site-packages/_pytest/scope.py
(2798B)
""" 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. """ from __future__ import annotations from enum import Enum from functools import total_ordering from typing import Literal _ScopeName = Literal["session", "package", "module", "class", "function"] @total_ordering class Scope(Enum): """ 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 <<<- """ # Scopes need to be listed from lower to higher. Function: _ScopeName = "function" Class: _ScopeName = "class" Module: _ScopeName = "module" Package: _ScopeName = "package" Session: _ScopeName = "session" def next_lower(self) -> Scope: """Return the next lower scope.""" index = _SCOPE_INDICES[self] if index == 0: raise ValueError(f"{self} is the lower-most scope") return _ALL_SCOPES[index - 1] def next_higher(self) -> Scope: """Return the next higher scope.""" index = _SCOPE_INDICES[self] if index == len(_SCOPE_INDICES) - 1: raise ValueError(f"{self} is the upper-most scope") return _ALL_SCOPES[index + 1] def __lt__(self, other: Scope) -> bool: self_index = _SCOPE_INDICES[self] other_index = _SCOPE_INDICES[other] return self_index < other_index @classmethod def from_user( cls, scope_name: _ScopeName, descr: str, where: str | None = None ) -> Scope: """ 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. """ from _pytest.outcomes import fail try: # Holding this reference is necessary for mypy at the moment. scope = Scope(scope_name) except ValueError: fail( "{} {}got an unexpected scope value '{}'".format( descr, f"from {where} " if where else "", scope_name ), pytrace=False, ) return scope _ALL_SCOPES = list(Scope) _SCOPE_INDICES = {scope: index for index, scope in enumerate(_ALL_SCOPES)} # Ordered list of scopes which can contain many tests (in practice all except Function). HIGH_SCOPES = [x for x in Scope if x is not Scope.Function]
Save
cmd:
run