Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ac8e7d4

Browse files
committed
remove duplicate pytest.ini, use agg backend
1 parent af39d67 commit ac8e7d4

3 files changed

Lines changed: 7 additions & 22 deletions

File tree

doc/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"""
44
import pytest
55
import numpy
6+
import matplotlib
7+
8+
matplotlib.use('agg', force=True)
69

710
@pytest.fixture(autouse=True)
811
def add_np(doctest_namespace):

doc/pytest.ini

Lines changed: 0 additions & 22 deletions
This file was deleted.

pytest.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ filterwarnings =
1111
ignore:numpy.dtype size changed
1212
ignore:numpy.ufunc size changed
1313
ignore::UserWarning:cpuinfo,
14+
ignore: divide by zero encountered in log
15+
ignore: invalid value encountered in log
1416
# Matrix PendingDeprecationWarning.
1517
ignore:the matrix subclass is not
1618
ignore:Importing from numpy.matlib is
1719
# pytest warning when using PYTHONOPTIMIZE
1820
ignore:assertions not in test modules or plugins:pytest.PytestConfigWarning
1921
# TODO: remove below when array_api user warning is removed
2022
ignore:The numpy.array_api submodule is still experimental. See NEP 47.
23+
# ignore matplotlib headless warning for pyplot
24+
ignore:Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.:UserWarning

0 commit comments

Comments
 (0)