feat: more pythonic error parent class
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
class InternalAssertionException(AssertionError):
|
class InternalAssertionException(RuntimeError):
|
||||||
"""Exception raised for internal assertions."""
|
"""Exception raised for internal assertions."""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from unittest import TestCase
|
|||||||
|
|
||||||
class TestInternalAssertionException(TestCase):
|
class TestInternalAssertionException(TestCase):
|
||||||
def test_inheritance(self):
|
def test_inheritance(self):
|
||||||
self.assertTrue(issubclass(InternalAssertionException, AssertionError))
|
self.assertTrue(issubclass(InternalAssertionException, RuntimeError))
|
||||||
|
|
||||||
def test_message(self):
|
def test_message(self):
|
||||||
message = "This is an internal assertion error."
|
message = "This is an internal assertion error."
|
||||||
|
|||||||
Reference in New Issue
Block a user