Skip to content

Commit

Permalink
configure strict pytest (#442)
Browse files Browse the repository at this point in the history
* configure strict pytest

* ignore SSLSocket ResourceWarning

* ignore socket ResourceWarning

* ignore ssl.wrap_socket deprecation warning

* ignore ssl.PROTOCOL_TLS is deprecated DeprecationWarning
  • Loading branch information
graingert committed Feb 25, 2022
1 parent b400d72 commit ebf0684
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion setup.cfg
Expand Up @@ -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
Expand Down

0 comments on commit ebf0684

Please sign in to comment.