def test_ReprError_scalar(self): r = Result.asError('foo') self.assertEquals('Result.asError(\'foo\')', repr(r))
def test_ReprError_list(self): r = Result.asError(['foo', 'bar']) self.assertEquals("Result.asError(['foo', 'bar'])", repr(r))
def test_Create_asError(self): r = Result.asError('ouch') self.assertFalse(r.has_value) self.assertEquals('ouch', r.error) self.assertIsNone(r.value)