From a55fa9e4f00a3acf5afd2cc4835349db7505a7cc Mon Sep 17 00:00:00 2001 From: theOehrly <23384863+theOehrly@users.noreply.github.com> Date: Thu, 19 Oct 2023 19:37:56 +0200 Subject: [PATCH] CI: treat warnings as errors in tests --- pytest.ini | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 5c25857b3..276b0c917 100644 --- a/pytest.ini +++ b/pytest.ini @@ -13,13 +13,25 @@ norecursedirs = build python_files = test_*.py -addopts = --doctest-glob="*.rst" --xdoctest --mpl --mpl-baseline-path=fastf1/tests/mpl-baseline --mpl-results-path=mpl-results +addopts = + --doctest-glob="*.rst" + --xdoctest + --mpl + --mpl-baseline-path=fastf1/tests/mpl-baseline + --mpl-results-path=mpl-results filterwarnings = + # turn all warnings into errors + # (the last matching action is performed, therefore error needs to be first + error + # # fastf1 internal, only relevant for users # (10/2022) ignore:.*to_datetime.*will return NaT instead of raising an exception.*:FutureWarning + # (10/2023) + ignore:.*`utils\.delta_time` is considered deprecated.*:FutureWarning + # # external, verified as not relevant # (10/2022) ignore:.*df.iloc.*will attempt to set the values inplace.*:FutureWarning