/usr/lib/imh-dnskeyapi/venv/lib/python3.13/site-packages/_pytest
NameSizeModeActions
assertion/-0755rm
config/-0755rm
mark/-0755rm
_code/-0755rm
_io/-0755rm
_py/-0755rm
cacheprovider.py223730644editdlrm
capture.py353300644editdlrm
compat.py114670644editdlrm
debugging.py132600644editdlrm
deprecated.py31470644editdlrm
doctest.py262550644editdlrm
faulthandler.py36740644editdlrm
fixtures.py735500644editdlrm
freeze_support.py12910644editdlrm
helpconfig.py88950644editdlrm
hookspec.py428310644editdlrm
junitxml.py255740644editdlrm
legacypath.py165880644editdlrm
logging.py351240644editdlrm
main.py374160644editdlrm
monkeypatch.py145980644editdlrm
nodes.py264830644editdlrm
outcomes.py105320644editdlrm
pastebin.py39780644editdlrm
pathlib.py375690644editdlrm
py.typed00644editdlrm
pytester.py615520644editdlrm
pytester_assertions.py22440644editdlrm
python.py648510644editdlrm
python_api.py401220644editdlrm
python_path.py7450644editdlrm
recwarn.py132270644editdlrm
reports.py213310644editdlrm
runner.py194360644editdlrm
scope.py27980644editdlrm
setuponly.py33060644editdlrm
setupplan.py11840644editdlrm
skipping.py102170644editdlrm
stash.py30900644editdlrm
stepwise.py45960644editdlrm
terminal.py573930644editdlrm
threadexception.py30050644editdlrm
timing.py4130644editdlrm
tmpdir.py113750644editdlrm
unittest.py156140644editdlrm
unraisableexception.py32520644editdlrm
warnings.py52110644editdlrm
warning_types.py43880644editdlrm
_argcomplete.py37760644editdlrm
_version.py5110644editdlrm
__init__.py3910644editdlrm
Edit: /usr/lib/imh-dnskeyapi/venv/lib/python3.13/site-packages/_pytest/pytester_assertions.py (2244B)
"""Helper plugin for pytester; should not be loaded on its own.""" # This plugin contains assertions used by pytester. pytester cannot # contain them itself, since it is imported by the `pytest` module, # hence cannot be subject to assertion rewriting, which requires a # module to not be already imported. from __future__ import annotations from typing import Sequence from _pytest.reports import CollectReport from _pytest.reports import TestReport def assertoutcome( outcomes: tuple[ Sequence[TestReport], Sequence[CollectReport | TestReport], Sequence[CollectReport | TestReport], ], passed: int = 0, skipped: int = 0, failed: int = 0, ) -> None: __tracebackhide__ = True realpassed, realskipped, realfailed = outcomes obtained = { "passed": len(realpassed), "skipped": len(realskipped), "failed": len(realfailed), } expected = {"passed": passed, "skipped": skipped, "failed": failed} assert obtained == expected, outcomes def assert_outcomes( outcomes: dict[str, int], passed: int = 0, skipped: int = 0, failed: int = 0, errors: int = 0, xpassed: int = 0, xfailed: int = 0, warnings: int | None = None, deselected: int | None = None, ) -> None: """Assert that the specified outcomes appear with the respective numbers (0 means it didn't occur) in the text output from a test run.""" __tracebackhide__ = True obtained = { "passed": outcomes.get("passed", 0), "skipped": outcomes.get("skipped", 0), "failed": outcomes.get("failed", 0), "errors": outcomes.get("errors", 0), "xpassed": outcomes.get("xpassed", 0), "xfailed": outcomes.get("xfailed", 0), } expected = { "passed": passed, "skipped": skipped, "failed": failed, "errors": errors, "xpassed": xpassed, "xfailed": xfailed, } if warnings is not None: obtained["warnings"] = outcomes.get("warnings", 0) expected["warnings"] = warnings if deselected is not None: obtained["deselected"] = outcomes.get("deselected", 0) expected["deselected"] = deselected assert obtained == expected