From 32aa821165af82a10915f32fe4add899966749c0 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 4 Jan 2021 18:27:01 +0100 Subject: [PATCH] Ignore unraisable & unhandled exceptions in pytest Refs: * #355 * https://docs.pytest.org/en/stable/usage.html#unraisable * https://github.com/pytest-dev/pytest/issues/5299 --- pytest.ini | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pytest.ini b/pytest.ini index a044fbbb9f..a64781b732 100644 --- a/pytest.ini +++ b/pytest.ini @@ -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. :pytest.PytestUnraisableExceptionWarning:_pytest.unraisableexception + ignore:Exception ignored in. :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