Migrate "test" command to invoke

This commit is contained in:
Oliver Walters 2020-08-21 21:10:14 +10:00
parent 05fae4be87
commit ab75f85555
2 changed files with 14 additions and 6 deletions

View File

@ -30,12 +30,6 @@ translate:
style: style:
flake8 InvenTree flake8 InvenTree
# Run unit tests
test:
cd InvenTree && python3 manage.py check
cd InvenTree && python3 manage.py test barcode build common company label order part report stock InvenTree
# Install packages required to generate code docs # Install packages required to generate code docs
docreqs: docreqs:
pip3 install -U -r docs/requirements.txt pip3 install -U -r docs/requirements.txt

View File

@ -145,6 +145,20 @@ def update(c):
""" """
pass pass
@task
def test(c):
"""
Run unit-tests for InvenTree codebase.
"""
# Run sanity check on the django install
manage(c, 'check')
# Run coverage tests
manage(c, 'test {apps}'.format(
apps=' '.join(apps())
))
@task @task
def coverage(c): def coverage(c):
""" """