Skip to content
Snippets Groups Projects
Commit 86927ba0 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

add extra tests for exceptions

parent 7c7407e7
No related branches found
No related tags found
No related merge requests found
......@@ -10,5 +10,19 @@ class TestExceptions(unittest.TestCase):
except BaseSatellaException as e:
self.assertIn('arg1', str(e))
self.assertIn('arg2', str(e))
self.assertIn('BaseSatellaException', str(e))
else:
self.fail()
def test_except_inherited(self):
class InheritedException(BaseSatellaException):
pass
try:
raise InheritedException('message', 'arg1', 'arg2')
except BaseSatellaException as e:
self.assertIn('arg1', str(e))
self.assertIn('arg2', str(e))
self.assertIn('InheritedException', str(e))
else:
self.fail()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment