summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Larson <larson.eric.d@gmail.com>2019-06-03 11:41:33 -0400
committerGitHub <noreply@github.com>2019-06-03 11:41:33 -0400
commitc2175bbb635c8f2ec551e4701f39fd0341d4e990 (patch)
treefd4f39e6fd60612eb99d671f87d334d8b15761e0
parent2578a922290ffefcd6c770cb0d4085d211fe2168 (diff)
downloadnumpydoc-c2175bbb635c8f2ec551e4701f39fd0341d4e990.tar.gz
MAINT: doctest and pytest (#225)
* MAINT: doctest and pytest * BUG: Dependency missing
-rw-r--r--.gitignore2
-rw-r--r--.travis.yml2
-rw-r--r--doc/example.py2
-rw-r--r--setup.cfg7
4 files changed, 11 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 51259fa..f5a885a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,8 @@
*.egg-info
*.swp
*.swo
+.coverage*
+junit-results.xml
.pytest_cache
doc/_build
build
diff --git a/.travis.yml b/.travis.yml
index 7db72a6..69cb9d7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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
diff --git a/doc/example.py b/doc/example.py
index ef2860d..e8e6e5f 100644
--- a/doc/example.py
+++ b/doc/example.py
@@ -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
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..1832c27
--- /dev/null
+++ b/setup.cfg
@@ -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
+