mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
5e20f5a04a
Vendor in Pytest (2.9.2) and its requirement Py (1.4.31), so that it can be used for e.g. the Marionette harness unit tests and a pytest plugin for mozlog. Copy pytest and py package directories (extracted from tars on Pip) into `mozilla-central/python/`, removing some support files (e.g. changelog, docs, tests). Add both `.pth` entries to `virtualenv_packages.txt`. Add both paths to `SEARCH_PATHS` in `mach_bootstrap.py`. MozReview-Commit-ID: IOTCOUxX8R9 --HG-- extra : rebase_source : e03d8a4be084062c0055b365bcc18da6dbb0b7a7
29 lines
621 B
Python
29 lines
621 B
Python
# PYTHON_ARGCOMPLETE_OK
|
|
"""
|
|
pytest: unit and functional testing with Python.
|
|
"""
|
|
__all__ = [
|
|
'main',
|
|
'UsageError',
|
|
'cmdline',
|
|
'hookspec',
|
|
'hookimpl',
|
|
'__version__',
|
|
]
|
|
|
|
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
|
|
|
|
from _pytest.config import (
|
|
main, UsageError, _preloadplugins, cmdline,
|
|
hookspec, hookimpl
|
|
)
|
|
from _pytest import __version__
|
|
|
|
_preloadplugins() # to populate pytest.* namespace so help(pytest) works
|
|
|