def _maybe_pipeline(number: int) -> Maybe[int]: first: int = Some(number).unwrap() if number else Nothing.unwrap() return Some(first + number)
def test_unwrap_failure(): """Ensures that unwrap works for Nothing container.""" with pytest.raises(UnwrapFailedError): assert Nothing.unwrap()