3
0
Fork 0

fix: add simple rendering logic for currency values and errors

This commit is contained in:
Lance Edgar 2024-12-28 20:10:37 -06:00
parent 78a9965c52
commit 9c1bfee97f
4 changed files with 111 additions and 1 deletions

View file

@ -317,3 +317,20 @@ class TestResourcePath(TestCase):
# absolute path returned as-is
self.assertEqual(mod.resource_path('/tmp/doesnotexist.txt'), '/tmp/doesnotexist.txt')
class TestSimpleError(TestCase):
def test_with_description(self):
try:
raise RuntimeError("just testin")
except Exception as error:
result = mod.simple_error(error)
self.assertEqual(result, "RuntimeError: just testin")
def test_without_description(self):
try:
raise RuntimeError
except Exception as error:
result = mod.simple_error(error)
self.assertEqual(result, "RuntimeError")