changeset 5909:ab36d9a31a2d

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.
author Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
date Fri, 06 May 2016 21:20:56 +0200
parents e82963996ae8
children 313930ae35ad
files kallithea/tests/__init__.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/tests/__init__.py	Wed May 04 17:49:12 2016 +0200
+++ b/kallithea/tests/__init__.py	Fri May 06 21:20:56 2016 +0200
@@ -272,6 +272,6 @@
         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)