# HG changeset patch # User Thomas De Schampheleire # Date 2016-05-06 21:20:56 # Node ID ab36d9a31a2d8f891faca35b4a92ce0d9e694437 # Parent e82963996ae85f0f899a285279d79990f4419f32 pytest migration: add args/kwargs to assertRaises replacement Even though we'll soon get rid of the assertRaises replacement, the tests in kallithea/tests/other/test_validators.py expect to pass it args and kwargs so we need to adapt it first. diff --git a/kallithea/tests/__init__.py b/kallithea/tests/__init__.py --- a/kallithea/tests/__init__.py +++ b/kallithea/tests/__init__.py @@ -272,6 +272,6 @@ class TestControllerPytest(BaseTestContr assert first == second def assertDictEqual(self, first, second, msg=None): assert first == second - def assertRaises(self, exception, method): + def assertRaises(self, exception, method, *args, **kwargs): with pytest.raises(exception): - method() + method(*args, **kwargs)