diff --git a/docs/Makefile b/docs/Makefile
index 068e0930c736da0f97138e8ebdc960cc303cd4cc..6c525158a6cd3d521b62b8faff7a305d5bc304cc 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -7,7 +7,7 @@ SPHINXOPTS    ?= -W --keep-going -n -j auto # warnings as errors, parallel build
 SPHINXBUILD   ?= sphinx-build
 SOURCEDIR     = .
 BUILDDIR      = _build
-EXCLUDES      = "$(SOURCEDIR)/../**/examples/**" "$(SOURCEDIR)/../**/tests/**"
+EXCLUDES      = "$(SOURCEDIR)/../**/examples/**" "$(SOURCEDIR)/../tests/**"
 APIDOC_ARGS   = --force --implicit-namespaces --module-first --separate
 
 # Put it first so that "make" without argument is like "make help".
diff --git a/docs/make.bat b/docs/make.bat
index 2d65f05dd130835bd48e8cdf1dabb9eae4463c94..5882dd4c20ea812dd3409585e3d3aa4033089c61 100644
--- a/docs/make.bat
+++ b/docs/make.bat
@@ -9,7 +9,7 @@ if "%SPHINXBUILD%" == "" (
 )
 set SOURCEDIR=.
 set BUILDDIR=_build
-set EXCLUDES="%SOURCEDIR%\..\**\examples\**" "%SOURCEDIR%\..\**\tests\**"
+set EXCLUDES="%SOURCEDIR%\..\**\examples\**" "%SOURCEDIR%\..\tests\**"
 set APIDOC_ARGS=--force --implicit-namespaces --module-first --separate
 
 %SPHINXBUILD% >NUL 2>NUL
diff --git a/pyproject.toml b/pyproject.toml
index d42e4020961c3ae3b6ee64d01df669ad9565b3a9..13e6a902a44450f2dd450d5892a2243858177cdf 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -52,6 +52,14 @@ docs = [
   "sphinx_gallery",
 ]
 
+[tool.pytest.ini_options]
+minversion = "6.0"
+addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
+xfail_strict = true
+filterwarnings = ["error"]
+log_cli_level = "info"
+testpaths = ["tests"]
+
 [tool.black]
 line-length = 80