mirror of
https://github.com/clearlinux/autospec.git
synced 2026-11-25 23:23:59 +00:00
Add coverage statistics to unittest runs
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
This commit is contained in:
@@ -3,3 +3,5 @@ __pycache__
|
||||
*~
|
||||
*.swp
|
||||
tags
|
||||
.coverage
|
||||
htmlcov
|
||||
|
||||
@@ -2,6 +2,10 @@ language: python
|
||||
sudo: enabled
|
||||
python:
|
||||
- "3.6"
|
||||
|
||||
install:
|
||||
- pip install -r requirements.txt
|
||||
|
||||
# command to run tests
|
||||
script:
|
||||
- make check
|
||||
|
||||
@@ -47,4 +47,7 @@ test_autospec:
|
||||
python3 tests/test_autospec.py -c ${CASES}
|
||||
|
||||
unittests:
|
||||
PYTHONPATH=${CURDIR}/autospec python3 -m unittest discover -b -s tests -p 'test_*.py'
|
||||
PYTHONPATH=${CURDIR}/autospec coverage run -m unittest discover -b -s tests -p 'test_*.py' && coverage report
|
||||
|
||||
coverage:
|
||||
coverage report -m
|
||||
|
||||
@@ -2,3 +2,4 @@ flake8>=3.4.0
|
||||
pycurl>=7.43.0
|
||||
toml>=0.9.0
|
||||
mock>=2.0.0
|
||||
coverage>=4.4.1
|
||||
|
||||
Reference in New Issue
Block a user