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