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
|
|
|
|
|
2015-04-29 22:40:52 +08:00
|
|
|
from _pytest.config import (
|
|
|
|
main, UsageError, _preloadplugins, cmdline,
|
2015-05-06 16:08:08 +08:00
|
|
|
hookspec, hookimpl
|
2015-04-29 22:40:52 +08:00
|
|
|
)
|
2015-07-26 20:04:52 +08:00
|
|
|
from _pytest import version as __version__
|
2013-09-30 19:14:14 +08:00
|
|
|
|
|
|
|
_preloadplugins() # to populate pytest.* namespace so help(pytest) works
|
|
|
|
|