# HG changeset patch # User Thomas De Schampheleire # Date 1458060919 -3600 # Node ID 91b89797a775ccd68c9710967532d4813779b317 # Parent 72e8508d9758294bb71f0dbd3142b2c5fc384381 pytest migration: add temporary assertRaises wrapper Similar to the other temporary unittest-assert wrappers, add the missing assertRaises and forward to pytest.raises. diff -r 72e8508d9758 -r 91b89797a775 kallithea/tests/__init__.py --- a/kallithea/tests/__init__.py Mon Apr 25 13:35:21 2016 +0200 +++ b/kallithea/tests/__init__.py Tue Mar 15 17:55:19 2016 +0100 @@ -272,3 +272,6 @@ assert first == second def assertDictEqual(self, first, second, msg=None): assert first == second + def assertRaises(self, exception, method): + with pytest.raises(exception): + method()