From 517ef1d3345a9131e80ef99236d289dece3ad498 Mon Sep 17 00:00:00 2001 From: Nicolas ROCHE Date: Wed, 19 Feb 2020 16:26:49 +0100 Subject: [PATCH] python3: modify exception string (#40012) --- tests/test_cook.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_cook.py b/tests/test_cook.py index d12b48d..3188b4c 100644 --- a/tests/test_cook.py +++ b/tests/test_cook.py @@ -178,9 +178,8 @@ def test_wait_operationals(db, monkeypatch): # not operational obj2.last_operational_success_timestamp = None - with pytest.raises(CommandError) as e_info: + with pytest.raises(CommandError, match='timeout waiting for url2'): command.wait_operationals(.6) - assert str(e_info).find('CommandError: timeout waiting for url2') != -1 def test_set_variable(db): command = Command()