Skip to content

Commit 8abacee

Browse files
committed
Call coverage from command line.
So that function definition lines show as tested.
1 parent ea4d615 commit 8abacee

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

.coveragerc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[report]
2+
omit =
3+
*/python?.?/*
4+
*/site-packages/nose/*

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ before_install:
88

99
install: "pip install -r requirements.txt"
1010

11-
script: python tests.py --with-doctest --with-coverage --cover-package=nodepy;
11+
script: coverage run --source=nodepy tests.py
1212

1313
after_success:
1414
- coveralls

tests.py

+20-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
11
#!/usr/bin/env python
22

33
import matplotlib
4-
import nose
4+
import doctest
5+
import nodepy
56
matplotlib.use('agg')
7+
import unittest
68

7-
nose.main()
9+
for module_name in ('runge_kutta_method',
10+
'linear_multistep_method',
11+
'ivp',
12+
'low_storage_rk',
13+
'rooted_trees',
14+
'snp',
15+
'stability_function',
16+
'general_linear_method',
17+
'ode_solver',
18+
'semidisc',
19+
'strmanip',
20+
'utils',
21+
'convergence'):
22+
module = nodepy.__getattribute__(module_name)
23+
doctest.testmod(module)
24+
25+
unittest.main(module='nodepy.unit_tests',exit=False)

0 commit comments

Comments
 (0)