From ebf06848463a76492459e59221d665511afd52e2 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Fri, 25 Feb 2022 11:23:41 +0000 Subject: [PATCH] configure strict pytest (#442) * configure strict pytest * ignore SSLSocket ResourceWarning * ignore socket ResourceWarning * ignore ssl.wrap_socket deprecation warning * ignore ssl.PROTOCOL_TLS is deprecated DeprecationWarning --- setup.cfg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 4ffd23165..dd1dc3aeb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,9 +19,14 @@ known_third_party = brotli,certifi,chardet,cryptography,h11,h2,hstspreload,pytes skip = httpcore/_sync/,tests/_sync [tool:pytest] -addopts = -rxXs +addopts = -rxXs --strict-config --strict-markers markers = copied_from(source, changes=None): mark test as copied from somewhere else, along with a description of changes made to accodomate e.g. our test setup +filterwarnings = + error + ignore:unclosed <(socket\.socket|ssl\.SSLSocket) .*:ResourceWarning + ignore:ssl\.wrap_socket\(\) is deprecated, use SSLContext\.wrap_socket\(\):DeprecationWarning + ignore:ssl\.PROTOCOL_TLS is deprecated:DeprecationWarning [coverage:run] omit = venv/*, httpcore/_sync/*, httpcore/_compat.py