-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d46044
commit b549aad
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |