From 91084644a0531d1aabd9556318cc0ea56bcf0f3d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:07:38 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/_pytest/python_api.py | 1 - testing/python/expected_exception_group.py | 1 - 2 files changed, 2 deletions(-) diff --git a/src/_pytest/python_api.py b/src/_pytest/python_api.py index 464654050..72973e2cf 100644 --- a/src/_pytest/python_api.py +++ b/src/_pytest/python_api.py @@ -1166,7 +1166,6 @@ def raises( try: func(*args[1:], **kwargs) except expected_exception as e: # type: ignore[misc] # TypeError raised for any ExpectedExceptionGroup - return _pytest._code.ExceptionInfo.from_exception(e) fail(message) diff --git a/testing/python/expected_exception_group.py b/testing/python/expected_exception_group.py index a3d964123..5d74b7361 100644 --- a/testing/python/expected_exception_group.py +++ b/testing/python/expected_exception_group.py @@ -119,7 +119,6 @@ class TestExpectedExceptionGroup: assert eeg.matches(ExceptionGroup("", (ValueError(),))) def test_message(self) -> None: - try: with pytest.raises(ExpectedExceptionGroup(ValueError)): ...