This commit is contained in:
Iliyan Angelov
2025-12-06 03:27:35 +02:00
parent 7667eb5eda
commit 5a8ca3c475
2211 changed files with 28086 additions and 37066 deletions

View File

@@ -1,8 +1,5 @@
# PYTHON_ARGCOMPLETE_OK
"""pytest: unit and functional testing with Python."""
from __future__ import annotations
from _pytest import __version__
from _pytest import version_tuple
from _pytest._code import ExceptionInfo
@@ -23,7 +20,6 @@ from _pytest.config.argparsing import Parser
from _pytest.debugging import pytestPDB as __pytestPDB
from _pytest.doctest import DoctestItem
from _pytest.fixtures import fixture
from _pytest.fixtures import FixtureDef
from _pytest.fixtures import FixtureLookupError
from _pytest.fixtures import FixtureRequest
from _pytest.fixtures import yield_fixture
@@ -31,9 +27,7 @@ from _pytest.freeze_support import freeze_includes
from _pytest.legacypath import TempdirFactory
from _pytest.legacypath import Testdir
from _pytest.logging import LogCaptureFixture
from _pytest.main import Dir
from _pytest.main import Session
from _pytest.mark import HIDDEN_PARAM
from _pytest.mark import Mark
from _pytest.mark import MARK_GEN as mark
from _pytest.mark import MarkDecorator
@@ -41,7 +35,6 @@ from _pytest.mark import MarkGenerator
from _pytest.mark import param
from _pytest.monkeypatch import MonkeyPatch
from _pytest.nodes import Collector
from _pytest.nodes import Directory
from _pytest.nodes import File
from _pytest.nodes import Item
from _pytest.outcomes import exit
@@ -60,9 +53,7 @@ from _pytest.python import Metafunc
from _pytest.python import Module
from _pytest.python import Package
from _pytest.python_api import approx
from _pytest.raises import raises
from _pytest.raises import RaisesExc
from _pytest.raises import RaisesGroup
from _pytest.python_api import raises
from _pytest.recwarn import deprecated_call
from _pytest.recwarn import WarningsRecorder
from _pytest.recwarn import warns
@@ -71,9 +62,6 @@ from _pytest.reports import TestReport
from _pytest.runner import CallInfo
from _pytest.stash import Stash
from _pytest.stash import StashKey
from _pytest.subtests import SubtestReport
from _pytest.subtests import Subtests
from _pytest.terminal import TerminalReporter
from _pytest.terminal import TestShortLogReport
from _pytest.tmpdir import TempPathFactory
from _pytest.warning_types import PytestAssertRewriteWarning
@@ -82,42 +70,50 @@ from _pytest.warning_types import PytestCollectionWarning
from _pytest.warning_types import PytestConfigWarning
from _pytest.warning_types import PytestDeprecationWarning
from _pytest.warning_types import PytestExperimentalApiWarning
from _pytest.warning_types import PytestFDWarning
from _pytest.warning_types import PytestRemovedIn9Warning
from _pytest.warning_types import PytestRemovedIn10Warning
from _pytest.warning_types import PytestRemovedIn8Warning
from _pytest.warning_types import PytestReturnNotNoneWarning
from _pytest.warning_types import PytestUnhandledCoroutineWarning
from _pytest.warning_types import PytestUnhandledThreadExceptionWarning
from _pytest.warning_types import PytestUnknownMarkWarning
from _pytest.warning_types import PytestUnraisableExceptionWarning
from _pytest.warning_types import PytestWarning
set_trace = __pytestPDB.set_trace
__all__ = [
"HIDDEN_PARAM",
"__version__",
"approx",
"Cache",
"CallInfo",
"CaptureFixture",
"Class",
"CollectReport",
"cmdline",
"Collector",
"CollectReport",
"Config",
"Dir",
"Directory",
"console_main",
"deprecated_call",
"DoctestItem",
"exit",
"ExceptionInfo",
"ExitCode",
"fail",
"File",
"FixtureDef",
"fixture",
"FixtureLookupError",
"FixtureRequest",
"freeze_includes",
"Function",
"hookimpl",
"HookRecorder",
"hookspec",
"importorskip",
"Item",
"LineMatcher",
"LogCaptureFixture",
"main",
"mark",
"Mark",
"MarkDecorator",
"MarkGenerator",
@@ -126,6 +122,7 @@ __all__ = [
"MonkeyPatch",
"OptionGroup",
"Package",
"param",
"Parser",
"PytestAssertRewriteWarning",
"PytestCacheWarning",
@@ -133,54 +130,42 @@ __all__ = [
"PytestConfigWarning",
"PytestDeprecationWarning",
"PytestExperimentalApiWarning",
"PytestFDWarning",
"PytestPluginManager",
"PytestRemovedIn9Warning",
"PytestRemovedIn10Warning",
"PytestRemovedIn8Warning",
"PytestReturnNotNoneWarning",
"Pytester",
"PytestPluginManager",
"PytestUnhandledCoroutineWarning",
"PytestUnhandledThreadExceptionWarning",
"PytestUnknownMarkWarning",
"PytestUnraisableExceptionWarning",
"PytestWarning",
"Pytester",
"RaisesExc",
"RaisesGroup",
"raises",
"RecordedHookCall",
"register_assert_rewrite",
"RunResult",
"Session",
"Stash",
"StashKey",
"SubtestReport",
"Subtests",
"TempPathFactory",
"TempdirFactory",
"TerminalReporter",
"TestReport",
"TestShortLogReport",
"Testdir",
"UsageError",
"WarningsRecorder",
"__version__",
"approx",
"cmdline",
"console_main",
"deprecated_call",
"exit",
"fail",
"fixture",
"freeze_includes",
"hookimpl",
"hookspec",
"importorskip",
"main",
"mark",
"param",
"raises",
"register_assert_rewrite",
"set_trace",
"skip",
"Stash",
"StashKey",
"version_tuple",
"TempdirFactory",
"TempPathFactory",
"Testdir",
"TestReport",
"TestShortLogReport",
"UsageError",
"WarningsRecorder",
"warns",
"xfail",
"yield_fixture",
]
def __getattr__(name: str) -> object:
if name == "Instance":
# The import emits a deprecation warning.
from _pytest.python import Instance
return Instance
raise AttributeError(f"module {__name__} has no attribute {name}")