fix: rm parenthesized context manager

This commit is contained in:
Oleg A 2023-09-18 16:26:33 +03:00
parent 5a6bdfd54b
commit b6e28a0b90
No known key found for this signature in database
GPG key ID: 5FE046817A9657C5

View file

@ -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.")