Changeset - 91b89797a775
[Not reviewed]
default
0 1 0
Thomas De Schampheleire - 10 years ago 2016-03-15 17:55:19
thomas.de.schampheleire@gmail.com
pytest migration: add temporary assertRaises wrapper

Similar to the other temporary unittest-assert wrappers, add the missing
assertRaises and forward to pytest.raises.
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/__init__.py
Show inline comments
 
@@ -269,6 +269,9 @@ class TestControllerPytest(BaseTestContr
 
    def assertSetEqual(self, first, second, msg=None):
 
        assert first == second
 
    def assertListEqual(self, first, second, msg=None):
 
        assert first == second
 
    def assertDictEqual(self, first, second, msg=None):
 
        assert first == second
 
    def assertRaises(self, exception, method):
 
        with pytest.raises(exception):
 
            method()
0 comments (0 inline, 0 general)