Mercurial > kallithea
changeset 5804:91b89797a775
pytest migration: add temporary assertRaises wrapper
Similar to the other temporary unittest-assert wrappers, add the missing
assertRaises and forward to pytest.raises.
author | Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> |
---|---|
date | Tue, 15 Mar 2016 17:55:19 +0100 |
parents | 72e8508d9758 |
children | be1d20bfd2dd |
files | kallithea/tests/__init__.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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()