Skip to content

Commit

Permalink
Ignore unraisable & unhandled exceptions in pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Jan 4, 2021
1 parent 0341a0b commit 32aa821
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pytest.ini
Expand Up @@ -29,6 +29,15 @@ addopts =
doctest_optionflags = ALLOW_UNICODE ELLIPSIS
filterwarnings =
error

# pytest>=6.2.0 under Python 3.8:
# Ref: https://docs.pytest.org/en/stable/usage.html#unraisable
# Ref: https://github.com/pytest-dev/pytest/issues/5299
ignore:Exception in thread CP Server Thread-:pytest.PytestUnhandledThreadExceptionWarning:_pytest.threadexception
ignore:Exception in thread Thread-:pytest.PytestUnhandledThreadExceptionWarning:_pytest.threadexception
ignore:Exception ignored in. <socket.socket fd=-1, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>:pytest.PytestUnraisableExceptionWarning:_pytest.unraisableexception
ignore:Exception ignored in. <socket.socket fd=-1, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6>:pytest.PytestUnraisableExceptionWarning:_pytest.unraisableexception

# cryptography==3.0 warning:
# `cryptography.utils.CryptographyDeprecationWarning` happens but we
# cannot import it because of the chicken-egg nature of its
Expand Down

0 comments on commit 32aa821

Please sign in to comment.