From b6e28a0b90522ccaa552b29ff626e8d16f23dc5e Mon Sep 17 00:00:00 2001 From: Oleg A Date: Mon, 18 Sep 2023 16:26:33 +0300 Subject: [PATCH] fix: rm parenthesized context manager --- tests/test_dispatcher/test_dispatcher.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index 20bc54f6..730a59b2 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -481,10 +481,8 @@ class TestDispatcher: async def test_listen_unknown_update(self): dp = Dispatcher() - with ( - pytest.raises(SkipHandler), - pytest.warns(RuntimeWarning, match="Detected unknown update type") as record, - ): + pattern = "Detected unknown update type" + with pytest.raises(SkipHandler), pytest.warns(RuntimeWarning, match=pattern) as record: await dp._listen_update(Update(update_id=42)) if not record: pytest.fail("Expected 'Detected unknown update type' warning.")