From e5f8e9c0dedb25be027633a8083fc39a83a7f831 Mon Sep 17 00:00:00 2001 From: Pablo Santiago Blum de Aguiar Date: Sun, 15 May 2016 17:04:09 -0300 Subject: [PATCH] #N/A: Assert deprecated warnings are raised --- tests/test_utils.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index e704e15f..fb36df1b 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -202,7 +202,8 @@ class TestCompatibilityCall(object): assert settings == _settings return True - assert compatibility_call(match, Command()) + with pytest.warns(UserWarning): + assert compatibility_call(match, Command()) def test_get_new_command(self): def get_new_command(command): @@ -217,7 +218,8 @@ class TestCompatibilityCall(object): assert settings == _settings return True - assert compatibility_call(get_new_command, Command()) + with pytest.warns(UserWarning): + assert compatibility_call(get_new_command, Command()) def test_side_effect(self): def side_effect(command, new_command): @@ -232,7 +234,8 @@ class TestCompatibilityCall(object): assert settings == _settings return True - assert compatibility_call(side_effect, Command(), Command()) + with pytest.warns(UserWarning): + assert compatibility_call(side_effect, Command(), Command()) class TestGetValidHistoryWithoutCurrent(object):