def test_combine_or_first_failure(self):
     """Test Result OR combinator"""
     result = combine_result_with_or(self.bad, self.good)
     self.assertEqual(result, self.good)
 def test_combine_or_both_success(self):
     """Test Result OR combinator"""
     result = combine_result_with_or(self.good, self.good)
     self.assertEqual(result, self.good)
 def test_combine_or_both_failure(self):
     """Test Result OR combinator"""
     result = combine_result_with_or(self.bad, self.alt_bad)
     self.assertEqual(
         result.payload, dict(self.bad.payload, **self.alt_bad.payload))
Пример #4
0
 def test_combine_or_first_failure(self):
     """Test Result OR combinator"""
     result = combine_result_with_or(self.bad, self.good)
     self.assertEqual(result, self.good)
Пример #5
0
 def test_combine_or_both_success(self):
     """Test Result OR combinator"""
     result = combine_result_with_or(self.good, self.good)
     self.assertEqual(result, self.good)
Пример #6
0
 def test_combine_or_both_failure(self):
     """Test Result OR combinator"""
     result = combine_result_with_or(self.bad, self.alt_bad)
     self.assertEqual(result.payload,
                      dict(self.bad.payload, **self.alt_bad.payload))