Skip to content

Commit b5f0e31

Browse files
author
kmarsteller
committed
trying out some coverage for the first time
1 parent b260c4e commit b5f0e31

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

.coveragerc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[report]
2+
exclude_lines =
3+
pragma: no cover
4+
def __repr__
5+
raise AssertionError
6+
raise NotImplementedError
7+
if __name__ == .__main__.:
8+
9+
[run]
10+
include =
11+
*/pyoptsparse/*
12+
13+
omit =
14+
*/build/*
15+
*/doc/*
16+
*/examples/*
17+
*/postprocessing/*
18+
*/test/*

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ syntax: glob
22
build/*
33
*.pyc
44
*.so
5-
*.out
5+
*.out
6+

.hgignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,10 @@ install:
6868
script:
6969
# run the tests from down here to see if it can work without being at top level
7070
# only do coverage on the upload machine.
71-
- testflo -v --pre_announce;
71+
- testflo -v --pre_announce --coverage --coverpkg pyoptsparse --cover-omit \*build/\* --cover-omit \*doc/\* --cover-omit \*examples/\* --cover-omit \*postprocessing/\* --cover-omit \*test/\* ;
7272

73+
74+
after_success:
75+
- coveralls --rcfile=../../.coveragerc --output=coveralls.json;
76+
- sed 's/\/home\/travis\/miniconda\/lib\/python'"$PY"'\/site-packages\///g' < coveralls.json > coveralls-upd.json;
77+
- coveralls --upload=coveralls-upd.json;

0 commit comments

Comments
 (0)