diff --git a/.gitignore b/.gitignore index 51259fa5..f5a885ab 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 7db72a65..69cb9d77 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 ef2860d0..e8e6e5f2 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 00000000..1832c275 --- /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 +