test_ok2/src/pytest.py

97 lines
2.6 KiB
Python
Raw Normal View History

# PYTHON_ARGCOMPLETE_OK
"""
pytest: unit and functional testing with Python.
"""
2017-03-16 18:35:00 +08:00
# else we are imported
from _pytest import __version__
from _pytest.assertion import register_assert_rewrite
from _pytest.config import cmdline
from _pytest.config import hookimpl
from _pytest.config import hookspec
from _pytest.config import main
from _pytest.config import UsageError
2017-03-16 18:35:00 +08:00
from _pytest.debugging import pytestPDB as __pytestPDB
from _pytest.fixtures import fillfixtures as _fillfuncargs
from _pytest.fixtures import fixture
from _pytest.fixtures import yield_fixture
from _pytest.freeze_support import freeze_includes
from _pytest.main import Session
from _pytest.mark import MARK_GEN as mark
from _pytest.mark import param
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.python import Class
from _pytest.python import Function
from _pytest.python import Instance
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 warns
from _pytest.warning_types import PytestDeprecationWarning
from _pytest.warning_types import PytestExperimentalApiWarning
from _pytest.warning_types import PytestUnknownMarkWarning
from _pytest.warning_types import PytestWarning
from _pytest.warning_types import RemovedInPytest4Warning
2017-06-11 18:15:30 +08:00
2017-03-16 18:35:00 +08:00
set_trace = __pytestPDB.set_trace
__all__ = [
2018-05-23 22:48:46 +08:00
"__version__",
"_fillfuncargs",
"approx",
"Class",
"cmdline",
"Collector",
2018-05-23 22:48:46 +08:00
"deprecated_call",
"exit",
"fail",
2018-05-23 22:48:46 +08:00
"File",
"fixture",
"freeze_includes",
2018-05-23 22:48:46 +08:00
"Function",
"hookimpl",
"hookspec",
"importorskip",
"Instance",
"Item",
"main",
"mark",
"Module",
"Package",
"param",
"PytestDeprecationWarning",
"PytestExperimentalApiWarning",
"PytestWarning",
2018-05-23 22:48:46 +08:00
"raises",
"register_assert_rewrite",
"RemovedInPytest4Warning",
"PytestUnknownMarkWarning",
"Session",
"set_trace",
"skip",
"UsageError",
"warns",
"xfail",
"yield_fixture",
]
2018-05-23 22:48:46 +08:00
if __name__ == "__main__":
2017-03-16 18:35:00 +08:00
# if run as a script or by 'python -m pytest'
# we trigger the below "else" condition by the following import
import pytest
2018-05-23 22:48:46 +08:00
raise SystemExit(pytest.main())
2017-03-16 18:35:00 +08:00
else:
2017-03-16 18:35:00 +08:00
from _pytest.compat import _setup_collect_fakemodule
2018-05-23 22:48:46 +08:00
2017-03-16 18:35:00 +08:00
_setup_collect_fakemodule()