Skip to content

Commit

Permalink
Add decorator test
Browse files Browse the repository at this point in the history
  • Loading branch information
danielSanchezQ committed Mar 29, 2024
1 parent 7d46044 commit b549aad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Empty file.
11 changes: 11 additions & 0 deletions rusty_results/tests/exceptions/test_early_return.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from rusty_results import early_return, Option, Some, Empty


def test_early_return():
@early_return
def __test_it() -> Option[str]:
foo: Option = Empty()
_ = ~foo
return Some(10)

assert __test_it() == Empty()

0 comments on commit b549aad

Please sign in to comment.