Add and configure coverage report for tests

parent 5d8c35c1
......@@ -5,6 +5,7 @@ MANIFEST
build
dist
install.sh
.coverage
.eggs
.tox
.venv
......@@ -77,7 +77,7 @@ build:debian:stretch:
stage: test
image: python
script:
- python setup.py test
- python setup.py test --addopts "--cov ligo/gracedb"
test:python2.7:
<<: *test
......
......@@ -7,6 +7,14 @@ markers =
cli: tests related to the command-line interface
integration: integration tests, connection to a GraceDB server required
[coverage:run]
omit =
ligo/gracedb/legacy_cli.py
ligo/gracedb/version.py
*/test/*
*/tests/*
*/conftest.py
[flake8]
ignore = E129, W503
exclude =
......
......@@ -41,6 +41,8 @@ pytest_requirement = 'pytest>=3.1.0'
if sys.version_info < (3, 5):
pytest_requirement += ',<5.0.0'
tests_require.append(pytest_requirement)
tests_require.append('pytest-cov')
# Add mock for Python 2
if sys.version_info.major < 3:
tests_require.append('mock>=2.0.0')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment