From 005fde6a7fba409390317dd4e8e4fdb0e36cf951 Mon Sep 17 00:00:00 2001 From: Dean Moldovan Date: Sun, 28 May 2017 22:39:05 +0200 Subject: [PATCH] Filter warnings on pytest >= v3.1 The new version of pytest now reports Python warnings by default. This commit filters out some third-party extension warnings which are not useful for pybind11 tests. --- tests/pytest.ini | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/pytest.ini b/tests/pytest.ini index 401cbe0a..cd6da3af 100644 --- a/tests/pytest.ini +++ b/tests/pytest.ini @@ -5,3 +5,10 @@ addopts = -rs # capture only Python print and C++ py::print, but not C output (low-level Python errors) --capture=sys +filterwarnings = + # make warnings into errors but ignore certain third-party extension issues + error + # importing scipy submodules on some version of Python + ignore::ImportWarning + # bogus numpy ABI warning (see numpy/#432) + ignore:.*numpy.dtype size changed.*:RuntimeWarning