示例#1
0
 def test_valid(self, d: AsMaybe):
     m = Maybe(1)
     assert m.as_maybe(d).is_something()
示例#2
0
 def test_invalid(self, d: AsMaybe):
     m = Maybe(NotImplemented)
     assert m.as_maybe(d).is_nothing()
示例#3
0
 def test_empty(self, d: AsMaybe):
     m = Maybe(EMPTY)
     assert m.as_maybe(d).is_nothing()