configure strict pytest and filterwarnings=['error', ... (#3173)

* configure strict pytest

* ignore current warnings
This commit is contained in:
Thomas Grainger 2022-07-16 13:18:55 +01:00 committed by GitHub
parent b0eed7c6bd
commit df5a87d93b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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''',
]