Skip to content

MAINT: doctest and pytest #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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