From df5a87d93bd81c719a9c3f21da84133eaceef7b3 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 16 Jul 2022 13:18:55 +0100 Subject: [PATCH 1/1] configure strict pytest and filterwarnings=['error', ... (#3173) * configure strict pytest * ignore current warnings --- pyproject.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index d937374..8b4b4ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ build-backend = "setuptools.build_meta" [tool.pytest.ini_options] # Option below requires `tests/optional.py` +addopts = "--strict-config --strict-markers" optional-tests = [ "no_blackd: run when `d` extra NOT installed", "no_jupyter: run when `jupyter` extra NOT installed", @@ -38,3 +39,10 @@ optional-tests = [ markers = [ "incompatible_with_mypyc: run when testing mypyc compiled black" ] +xfail_strict = true +filterwarnings = [ + "error", + '''ignore:Decorator `@unittest_run_loop` is no longer needed in aiohttp 3\.8\+:DeprecationWarning''', + '''ignore:Bare functions are deprecated, use async ones:DeprecationWarning''', + '''ignore:invalid escape sequence.*:DeprecationWarning''', +] -- 2.39.5