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
|
|
|
"""
|
|
|
|
__all__ = ['main']
|
|
|
|
|
|
|
|
if __name__ == '__main__': # 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
|
|
|
|
raise SystemExit(pytest.main())
|
2013-09-30 19:14:14 +08:00
|
|
|
|
|
|
|
# else we are imported
|
|
|
|
|
|
|
|
from _pytest.config import main, UsageError, _preloadplugins, cmdline
|
2015-04-25 17:29:11 +08:00
|
|
|
from _pytest.core import hookspec_opts, hookimpl_opts
|
2013-09-30 19:14:14 +08:00
|
|
|
from _pytest import __version__
|
|
|
|
|
|
|
|
_preloadplugins() # to populate pytest.* namespace so help(pytest) works
|
|
|
|
|