Skip to content

Commit

Permalink
Add coverage for ExceptionTrap.value and .tb. Increases coverage from…
Browse files Browse the repository at this point in the history
… 75% to 77%.
  • Loading branch information
jaraco committed Jan 19, 2023
1 parent 0e7e90a commit 2706e47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jaraco/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ class ExceptionTrap:
... raise ValueError("1 + 1 is not 3")
>>> bool(trap)
True
>>> trap.value
ValueError('1 + 1 is not 3')
>>> trap.tb
<traceback object at ...>
>>> with ExceptionTrap(ValueError) as trap:
... raise Exception()
Expand Down

0 comments on commit 2706e47

Please sign in to comment.