feat: more pythonic error parent class #48

Merged
HideyoshiNakazone merged 1 commits from feature/explicit-exception-type into main 2025-09-14 04:42:11 +00:00
2 changed files with 2 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
class InternalAssertionException(AssertionError): class InternalAssertionException(RuntimeError):
"""Exception raised for internal assertions.""" """Exception raised for internal assertions."""
def __init__( def __init__(

View File

@@ -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."