Merge "Allow tox to support regexes for unit tests"
This commit is contained in:
commit
77201c4f33
|
@ -124,6 +124,17 @@ All Pegleg tests are nested under ``tests``.
|
|||
Pegleg comes equipped with a number of `tox`_ targets for running unit tests,
|
||||
as well as `pep8`_ and `Bandit`_ checks.
|
||||
|
||||
Unit Tests
|
||||
----------
|
||||
|
||||
To run all unit tests, execute::
|
||||
|
||||
$ tox -epy35
|
||||
|
||||
To run unit tests using a regex, execute::
|
||||
|
||||
$ tox -epy35 -- <regex>
|
||||
|
||||
.. _Airship: https://airshipit.readthedocs.io
|
||||
.. _Deckhand: https://airship-deckhand.readthedocs.io/
|
||||
.. _Airship coding conventions: https://airshipit.readthedocs.io/en/latest/conventions.html
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
posargs=$@
|
||||
if [ ${#posargs} -ge 1 ]; then
|
||||
pytest -k ${posargs}
|
||||
else
|
||||
pytest
|
||||
fi
|
||||
set +e
|
Loading…
Reference in New Issue