예제 #1
0
def test_maybe_boolean_true() -> None:
    assert isinstance(maybe(True, predicate=bool), Just)
예제 #2
0
def test_maybe_something() -> None:
    assert isinstance(maybe(False), Just)
예제 #3
0
def test_maybe_boolean_false() -> None:
    assert isinstance(maybe(False, predicate=bool), Nothing)
예제 #4
0
def test_maybe_none() -> None:
    assert isinstance(maybe(None), Nothing)