From 133ece61d188f44817d55e2b307a5a57a5a35ada Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Sat, 11 May 2024 17:00:32 -0700 Subject: [PATCH] Improve pytest configuration --- pyproject.toml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index add8f746a..d2f38f4cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,24 @@ [tool.pytest.ini_options] +minversion = "8.2" doctest_optionflags = "NUMBER NORMALIZE_WHITESPACE ELLIPSIS" +xfail_strict = true filterwarnings = [ - "error", - "ignore:FigureCanvasAgg is non-interactive:UserWarning", - "ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning", - "ignore:'scipy.sparse.linalg.cg' keyword argument:DeprecationWarning", + "error", + "ignore:FigureCanvasAgg is non-interactive:UserWarning", + "ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning", + "ignore:'scipy.sparse.linalg.cg' keyword argument:DeprecationWarning", ] -addopts = "--ignore=advanced/advanced_numpy/examples/myobject_test.py --ignore=advanced/interfacing_with_c/ctypes_numpy/test_cos_doubles.py --ignore=advanced/interfacing_with_c/cython_numpy/test_cos_doubles.py --ignore=advanced/interfacing_with_c/numpy_c_api/test_cos_module_np.py --ignore=advanced/interfacing_with_c/numpy_shared/test_cos_doubles.py --ignore=advanced/interfacing_with_c/swig_numpy/test_cos_doubles.py --ignore=intro/scipy/examples/plot_t_test.py" +addopts = [ + "-ra", "--showlocals", "--strict-markers", "--strict-config", + "--ignore=advanced/advanced_numpy/examples/myobject_test.py", + "--ignore=advanced/interfacing_with_c/ctypes_numpy/test_cos_doubles.py", + "--ignore=advanced/interfacing_with_c/cython_numpy/test_cos_doubles.py", + "--ignore=advanced/interfacing_with_c/numpy_c_api/test_cos_module_np.py", + "--ignore=advanced/interfacing_with_c/numpy_shared/test_cos_doubles.py", + "--ignore=advanced/interfacing_with_c/swig_numpy/test_cos_doubles.py", + "--ignore=intro/scipy/examples/plot_t_test.py", +] +log_cli_level = "info" [tool.ruff] target-version = "py310"