Skip to content

Commit c2175bb

Browse files
authored
MAINT: doctest and pytest (#225)
* MAINT: doctest and pytest * BUG: Dependency missing
1 parent 2578a92 commit c2175bb

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*.egg-info
77
*.swp
88
*.swo
9+
.coverage*
10+
junit-results.xml
911
.pytest_cache
1012
doc/_build
1113
build

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ cache:
1515
before_install:
1616
- sudo apt-get install texlive texlive-latex-extra latexmk
1717
- pip install --upgrade pip setuptools # Upgrade pip and setuptools to get ones with `wheel` support
18-
- pip install pytest numpy matplotlib sphinx${SPHINX_SPEC}
18+
- pip install pytest pytest-cov numpy matplotlib sphinx${SPHINX_SPEC}
1919
script:
2020
- |
2121
python setup.py sdist

doc/example.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def foo(var1, var2, long_var_name='hi'):
114114
>>> a = [1, 2, 3]
115115
>>> print([x + 3 for x in a])
116116
[4, 5, 6]
117-
>>> print("a\n\nb")
117+
>>> print("a\nb")
118118
a
119119
b
120120

setup.cfg

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[tool:pytest]
2+
addopts =
3+
--showlocals --doctest-modules -ra --cov-report= --cov=numpydoc
4+
--junit-xml=junit-results.xml --ignore=doc/conf.py
5+
filterwarnings =
6+
ignore:Using or importing the ABCs.*:DeprecationWarning
7+

0 commit comments

Comments
 (0)