Current Path: > > opt > cloudlinux > venv > lib64 > python3.11 > site-packages > _pytest > >
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
__pycache__ | Directory | - | - | |
_code | Directory | - | - | |
_io | Directory | - | - | |
_py | Directory | - | - | |
assertion | Directory | - | - | |
config | Directory | - | - | |
mark | Directory | - | - | |
__init__.py | File | 356 bytes | April 17 2025 13:10:59. | |
_argcomplete.py | File | 3794 bytes | April 17 2025 13:10:59. | |
_version.py | File | 160 bytes | April 17 2025 13:10:59. | |
cacheprovider.py | File | 21392 bytes | April 17 2025 13:10:59. | |
capture.py | File | 34737 bytes | April 17 2025 13:10:59. | |
compat.py | File | 13200 bytes | April 17 2025 13:10:59. | |
debugging.py | File | 13498 bytes | April 17 2025 13:10:59. | |
deprecated.py | File | 5487 bytes | April 17 2025 13:10:59. | |
doctest.py | File | 25961 bytes | April 17 2025 13:10:59. | |
faulthandler.py | File | 3114 bytes | April 17 2025 13:10:59. | |
fixtures.py | File | 67085 bytes | April 17 2025 13:10:59. | |
freeze_support.py | File | 1339 bytes | April 17 2025 13:10:59. | |
helpconfig.py | File | 8538 bytes | April 17 2025 13:10:59. | |
hookspec.py | File | 32558 bytes | April 17 2025 13:10:59. | |
junitxml.py | File | 25716 bytes | April 17 2025 13:10:59. | |
legacypath.py | File | 16929 bytes | April 17 2025 13:10:59. | |
logging.py | File | 34031 bytes | April 17 2025 13:10:59. | |
main.py | File | 32491 bytes | April 17 2025 13:10:59. | |
monkeypatch.py | File | 14857 bytes | April 17 2025 13:10:59. | |
nodes.py | File | 26559 bytes | April 17 2025 13:10:59. | |
nose.py | File | 1688 bytes | April 17 2025 13:10:59. | |
outcomes.py | File | 10256 bytes | April 17 2025 13:10:59. | |
pastebin.py | File | 3949 bytes | April 17 2025 13:10:59. | |
pathlib.py | File | 25824 bytes | April 17 2025 13:10:59. | |
py.typed | File | 0 bytes | April 17 2025 13:10:59. | |
pytester.py | File | 61971 bytes | April 17 2025 13:10:59. | |
pytester_assertions.py | File | 2327 bytes | April 17 2025 13:10:59. | |
python.py | File | 71155 bytes | April 17 2025 13:10:59. | |
python_api.py | File | 38400 bytes | April 17 2025 13:10:59. | |
python_path.py | File | 709 bytes | April 17 2025 13:10:59. | |
recwarn.py | File | 10930 bytes | April 17 2025 13:10:59. | |
reports.py | File | 20840 bytes | April 17 2025 13:10:59. | |
runner.py | File | 18447 bytes | April 17 2025 13:10:59. | |
scope.py | File | 2882 bytes | April 17 2025 13:10:59. | |
setuponly.py | File | 3261 bytes | April 17 2025 13:10:59. | |
setupplan.py | File | 1214 bytes | April 17 2025 13:10:59. | |
skipping.py | File | 10200 bytes | April 17 2025 13:10:59. | |
stash.py | File | 3055 bytes | April 17 2025 13:10:59. | |
stepwise.py | File | 4714 bytes | April 17 2025 13:10:59. | |
terminal.py | File | 53509 bytes | April 17 2025 13:10:59. | |
threadexception.py | File | 2915 bytes | April 17 2025 13:10:59. | |
timing.py | File | 375 bytes | April 17 2025 13:10:59. | |
tmpdir.py | File | 11708 bytes | April 17 2025 13:10:59. | |
unittest.py | File | 14809 bytes | April 17 2025 13:10:59. | |
unraisableexception.py | File | 3191 bytes | April 17 2025 13:10:59. | |
warning_types.py | File | 4474 bytes | April 17 2025 13:10:59. | |
warnings.py | File | 5070 bytes | April 17 2025 13:10:59. |
from typing import Any from typing import cast from typing import Dict from typing import Generic from typing import TypeVar from typing import Union __all__ = ["Stash", "StashKey"] T = TypeVar("T") D = TypeVar("D") class StashKey(Generic[T]): """``StashKey`` is an object used as a key to a :class:`Stash`. A ``StashKey`` is associated with the type ``T`` of the value of the key. A ``StashKey`` is unique and cannot conflict with another key. """ __slots__ = () class Stash: r"""``Stash`` is a type-safe heterogeneous mutable mapping that allows keys and value types to be defined separately from where it (the ``Stash``) is created. Usually you will be given an object which has a ``Stash``, for example :class:`~pytest.Config` or a :class:`~_pytest.nodes.Node`: .. code-block:: python stash: Stash = some_object.stash If a module or plugin wants to store data in this ``Stash``, it creates :class:`StashKey`\s for its keys (at the module level): .. code-block:: python # At the top-level of the module some_str_key = StashKey[str]() some_bool_key = StashKey[bool]() To store information: .. code-block:: python # Value type must match the key. stash[some_str_key] = "value" stash[some_bool_key] = True To retrieve the information: .. code-block:: python # The static type of some_str is str. some_str = stash[some_str_key] # The static type of some_bool is bool. some_bool = stash[some_bool_key] """ __slots__ = ("_storage",) def __init__(self) -> None: self._storage: Dict[StashKey[Any], object] = {} def __setitem__(self, key: StashKey[T], value: T) -> None: """Set a value for key.""" self._storage[key] = value def __getitem__(self, key: StashKey[T]) -> T: """Get the value for key. Raises ``KeyError`` if the key wasn't set before. """ return cast(T, self._storage[key]) def get(self, key: StashKey[T], default: D) -> Union[T, D]: """Get the value for key, or return default if the key wasn't set before.""" try: return self[key] except KeyError: return default def setdefault(self, key: StashKey[T], default: T) -> T: """Return the value of key if already set, otherwise set the value of key to default and return default.""" try: return self[key] except KeyError: self[key] = default return default def __delitem__(self, key: StashKey[T]) -> None: """Delete the value for key. Raises ``KeyError`` if the key wasn't set before. """ del self._storage[key] def __contains__(self, key: StashKey[T]) -> bool: """Return whether key was set.""" return key in self._storage def __len__(self) -> int: """Return how many items exist in the stash.""" return len(self._storage)
SILENT KILLER Tool