123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- # PYTHON_ARGCOMPLETE_OK
- """pytest: unit and functional testing with Python."""
- from . import collect
- from _pytest import __version__
- from _pytest import version_tuple
- from _pytest._code import ExceptionInfo
- from _pytest.assertion import register_assert_rewrite
- from _pytest.cacheprovider import Cache
- from _pytest.capture import CaptureFixture
- from _pytest.config import cmdline
- from _pytest.config import Config
- from _pytest.config import console_main
- from _pytest.config import ExitCode
- from _pytest.config import hookimpl
- from _pytest.config import hookspec
- from _pytest.config import main
- from _pytest.config import PytestPluginManager
- from _pytest.config import UsageError
- from _pytest.config.argparsing import OptionGroup
- from _pytest.config.argparsing import Parser
- from _pytest.debugging import pytestPDB as __pytestPDB
- from _pytest.fixtures import _fillfuncargs
- from _pytest.fixtures import fixture
- from _pytest.fixtures import FixtureLookupError
- from _pytest.fixtures import FixtureRequest
- from _pytest.fixtures import yield_fixture
- 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 Session
- from _pytest.mark import Mark
- from _pytest.mark import MARK_GEN as mark
- from _pytest.mark import MarkDecorator
- from _pytest.mark import MarkGenerator
- from _pytest.mark import param
- from _pytest.monkeypatch import MonkeyPatch
- from _pytest.nodes import Collector
- from _pytest.nodes import File
- from _pytest.nodes import Item
- from _pytest.outcomes import exit
- from _pytest.outcomes import fail
- from _pytest.outcomes import importorskip
- from _pytest.outcomes import skip
- from _pytest.outcomes import xfail
- from _pytest.pytester import HookRecorder
- from _pytest.pytester import LineMatcher
- from _pytest.pytester import Pytester
- from _pytest.pytester import RecordedHookCall
- from _pytest.pytester import RunResult
- from _pytest.python import Class
- from _pytest.python import Function
- from _pytest.python import Metafunc
- from _pytest.python import Module
- from _pytest.python import Package
- from _pytest.python_api import approx
- from _pytest.python_api import raises
- from _pytest.recwarn import deprecated_call
- from _pytest.recwarn import WarningsRecorder
- from _pytest.recwarn import warns
- from _pytest.reports import CollectReport
- from _pytest.reports import TestReport
- from _pytest.runner import CallInfo
- from _pytest.stash import Stash
- from _pytest.stash import StashKey
- from _pytest.tmpdir import TempPathFactory
- from _pytest.warning_types import PytestAssertRewriteWarning
- from _pytest.warning_types import PytestCacheWarning
- 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 PytestRemovedIn7Warning
- from _pytest.warning_types import PytestRemovedIn8Warning
- 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__ = [
- "__version__",
- "_fillfuncargs",
- "approx",
- "Cache",
- "CallInfo",
- "CaptureFixture",
- "Class",
- "cmdline",
- "collect",
- "Collector",
- "CollectReport",
- "Config",
- "console_main",
- "deprecated_call",
- "exit",
- "ExceptionInfo",
- "ExitCode",
- "fail",
- "File",
- "fixture",
- "FixtureLookupError",
- "FixtureRequest",
- "freeze_includes",
- "Function",
- "hookimpl",
- "HookRecorder",
- "hookspec",
- "importorskip",
- "Item",
- "LineMatcher",
- "LogCaptureFixture",
- "main",
- "mark",
- "Mark",
- "MarkDecorator",
- "MarkGenerator",
- "Metafunc",
- "Module",
- "MonkeyPatch",
- "OptionGroup",
- "Package",
- "param",
- "Parser",
- "PytestAssertRewriteWarning",
- "PytestCacheWarning",
- "PytestCollectionWarning",
- "PytestConfigWarning",
- "PytestDeprecationWarning",
- "PytestExperimentalApiWarning",
- "PytestRemovedIn7Warning",
- "PytestRemovedIn8Warning",
- "Pytester",
- "PytestPluginManager",
- "PytestUnhandledCoroutineWarning",
- "PytestUnhandledThreadExceptionWarning",
- "PytestUnknownMarkWarning",
- "PytestUnraisableExceptionWarning",
- "PytestWarning",
- "raises",
- "RecordedHookCall",
- "register_assert_rewrite",
- "RunResult",
- "Session",
- "set_trace",
- "skip",
- "Stash",
- "StashKey",
- "version_tuple",
- "TempdirFactory",
- "TempPathFactory",
- "Testdir",
- "TestReport",
- "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}")
|