Skip to content

Commit 9374faa

Browse files
committed
Coverage
- Add coverage tests
1 parent e0eff8a commit 9374faa

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ addons:
77
- python3-pip
88
- python3-maxminddb
99
- python3-yaml
10+
- python3-pytest
11+
- python3-coverage
1012
language: sh
1113
script:
1214
- python3 -m venv venv --system-site-packages
1315
- . venv/bin/activate
1416
- pip install -e .
17+
- python3-coverage run -m pytest
1518
- cd tests
1619
- ./test.sh

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[tool:pytest]
2+
testpaths = tests
3+
14
[coverage:run]
25
branch = True
36
source =

sonar-project.properties.local

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sonar.sources=dsc_datatool

tests/test_main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import pytest
2+
import dsc_datatool as app
3+
4+
def test_main():
5+
with pytest.raises(Exception):
6+
app.main()

0 commit comments

Comments
 (0)