pytest.py 520 Bytes
Newer Older
Alex Gaynor's avatar
Alex Gaynor committed
1
#!/usr/bin/env python
2
# PYTHON_ARGCOMPLETE_OK
3
"""
4
pytest: unit and functional testing with Python.
5 6 7
"""
__all__ = ['main']

8 9 10 11 12 13
if __name__ == '__main__': # if run as a script or by 'python -m pytest'
    # we trigger the below "else" condition by the following import
    import pytest
    raise SystemExit(pytest.main())

# else we are imported
14

15
from _pytest.config import main, UsageError, _preloadplugins, cmdline
16
from _pytest import __version__
17

18
_preloadplugins() # to populate pytest.* namespace so help(pytest) works
19