From d6bb01cf691c7a5e26b233bc12d14caba2ca480d Mon Sep 17 00:00:00 2001 From: Jens Troeger Date: Mon, 3 Jul 2023 07:39:23 +1000 Subject: [PATCH] fix: fail pytest if an unraisable/unhandled thread exception was detected during the execution of a test --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 34c2cc46..fe043bc9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -209,4 +209,7 @@ testpaths = [ env = [] filterwarnings = [ "always::DeprecationWarning", + # https://docs.pytest.org/en/latest/how-to/failures.html#warning-about-unraisable-exceptions-and-unhandled-thread-exceptions + "error::pytest.PytestUnraisableExceptionWarning", + "error::pytest.PytestUnhandledThreadExceptionWarning", ]