Skip to content

Commit

Permalink
feat(test): #16 add test_try_nested
Browse files Browse the repository at this point in the history
  • Loading branch information
rohaquinlop committed Mar 3, 2024
1 parent e4f2aa0 commit 244bc78
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/test_try_nested.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
def test_try():
try:
# Code that may raise an exception
pass
except TypeError:
if True:
print("Caught a TypeError")
except ValueError:
if True:
print("Caught a ValueError")
except Exception as e:
print(f"Caught an exception: {str(e)}")
else:
if True:
print("No exception occurred")
finally:
if True:
print("Always executed")

0 comments on commit 244bc78

Please sign in to comment.