Skip to content

Commit

Permalink
MAINT: doctest and pytest (#225)
Browse files Browse the repository at this point in the history
* MAINT: doctest and pytest

* BUG: Dependency missing
  • Loading branch information
larsoner committed Jun 3, 2019
1 parent 2578a92 commit c2175bb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*.egg-info
*.swp
*.swo
.coverage*
junit-results.xml
.pytest_cache
doc/_build
build
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cache:
before_install:
- sudo apt-get install texlive texlive-latex-extra latexmk
- pip install --upgrade pip setuptools # Upgrade pip and setuptools to get ones with `wheel` support
- pip install pytest numpy matplotlib sphinx${SPHINX_SPEC}
- pip install pytest pytest-cov numpy matplotlib sphinx${SPHINX_SPEC}
script:
- |
python setup.py sdist
Expand Down
2 changes: 1 addition & 1 deletion doc/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def foo(var1, var2, long_var_name='hi'):
>>> a = [1, 2, 3]
>>> print([x + 3 for x in a])
[4, 5, 6]
>>> print("a\n\nb")
>>> print("a\nb")
a
b
Expand Down
7 changes: 7 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[tool:pytest]
addopts =
--showlocals --doctest-modules -ra --cov-report= --cov=numpydoc
--junit-xml=junit-results.xml --ignore=doc/conf.py
filterwarnings =
ignore:Using or importing the ABCs.*:DeprecationWarning

0 comments on commit c2175bb

Please sign in to comment.