2013-07-25 21:33:43 +08:00
|
|
|
# PYTHON_ARGCOMPLETE_OK
|
2010-11-13 18:10:45 +08:00
|
|
|
"""
|
2012-09-25 17:58:41 +08:00
|
|
|
pytest: unit and functional testing with Python.
|
2010-11-13 18:10:45 +08:00
|
|
|
"""
|
2017-03-16 18:35:00 +08:00
|
|
|
# else we are imported
|
|
|
|
from _pytest import __version__
|
2018-10-25 15:01:29 +08:00
|
|
|
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
|
2018-10-25 15:01:29 +08:00
|
|
|
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
|
2019-04-28 21:06:01 +08:00
|
|
|
from _pytest.warning_types import PytestUnknownMarkWarning
|
2018-10-25 15:01:29 +08:00
|
|
|
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
|
|
|
|
|
2015-07-24 16:05:54 +08:00
|
|
|
__all__ = [
|
2018-05-23 22:48:46 +08:00
|
|
|
"__version__",
|
2018-09-04 00:14:57 +08:00
|
|
|
"_fillfuncargs",
|
|
|
|
"approx",
|
|
|
|
"Class",
|
|
|
|
"cmdline",
|
|
|
|
"Collector",
|
2018-05-23 22:48:46 +08:00
|
|
|
"deprecated_call",
|
|
|
|
"exit",
|
2018-09-04 00:14:57 +08:00
|
|
|
"fail",
|
2018-05-23 22:48:46 +08:00
|
|
|
"File",
|
2018-09-04 00:14:57 +08:00
|
|
|
"fixture",
|
|
|
|
"freeze_includes",
|
2018-05-23 22:48:46 +08:00
|
|
|
"Function",
|
2018-09-04 00:14:57 +08:00
|
|
|
"hookimpl",
|
|
|
|
"hookspec",
|
|
|
|
"importorskip",
|
|
|
|
"Instance",
|
|
|
|
"Item",
|
|
|
|
"main",
|
|
|
|
"mark",
|
|
|
|
"Module",
|
|
|
|
"Package",
|
|
|
|
"param",
|
2018-09-04 00:36:12 +08:00
|
|
|
"PytestDeprecationWarning",
|
2018-09-04 22:15:39 +08:00
|
|
|
"PytestExperimentalApiWarning",
|
2018-09-04 21:48:11 +08:00
|
|
|
"PytestWarning",
|
2018-05-23 22:48:46 +08:00
|
|
|
"raises",
|
2018-09-04 00:14:57 +08:00
|
|
|
"register_assert_rewrite",
|
|
|
|
"RemovedInPytest4Warning",
|
2019-04-28 21:06:01 +08:00
|
|
|
"PytestUnknownMarkWarning",
|
2018-09-04 00:14:57 +08:00
|
|
|
"Session",
|
|
|
|
"set_trace",
|
|
|
|
"skip",
|
|
|
|
"UsageError",
|
|
|
|
"warns",
|
|
|
|
"xfail",
|
|
|
|
"yield_fixture",
|
2015-07-24 16:05:54 +08:00
|
|
|
]
|
2010-11-13 18:10:45 +08:00
|
|
|
|
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'
|
2012-09-25 17:58:41 +08:00
|
|
|
# we trigger the below "else" condition by the following import
|
|
|
|
import pytest
|
2018-05-23 22:48:46 +08:00
|
|
|
|
2012-09-25 17:58:41 +08:00
|
|
|
raise SystemExit(pytest.main())
|
2017-03-16 18:35:00 +08:00
|
|
|
else:
|
2013-09-30 19:14:14 +08:00
|
|
|
|
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()
|