1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-10-31 07:04:12 +00:00

Merge pull request #507 from scorphus/assert-warns

#N/A: Assert deprecated warnings are raised
This commit is contained in:
Vladimir Iakovlev
2016-05-17 02:22:34 +03:00

View File

@@ -202,6 +202,7 @@ class TestCompatibilityCall(object):
assert settings == _settings assert settings == _settings
return True return True
with pytest.warns(UserWarning):
assert compatibility_call(match, Command()) assert compatibility_call(match, Command())
def test_get_new_command(self): def test_get_new_command(self):
@@ -217,6 +218,7 @@ class TestCompatibilityCall(object):
assert settings == _settings assert settings == _settings
return True return True
with pytest.warns(UserWarning):
assert compatibility_call(get_new_command, Command()) assert compatibility_call(get_new_command, Command())
def test_side_effect(self): def test_side_effect(self):
@@ -232,6 +234,7 @@ class TestCompatibilityCall(object):
assert settings == _settings assert settings == _settings
return True return True
with pytest.warns(UserWarning):
assert compatibility_call(side_effect, Command(), Command()) assert compatibility_call(side_effect, Command(), Command())