def test_absolve(self): right = either.Right(1) left = either.Left('error') right_effect = effect.success(right) left_effect = effect.success(left) assert effect.absolve(right_effect).run(None) == 1 with pytest.raises(Exception): # todo effect.absolve(left_effect).run(None)
def test_absolve_repr(self): assert repr(effect.absolve(effect.success(0))) == 'absolve(success(0))'