def test_c(self):
     """Test the sum of two time series of which the second one is empty."""
     timeserie_a = TimeseriesStub()
     timeserie_b = TimeseriesStub((datetime(2011, 5, 30), 10))
     result = raw_add_timeseries(timeserie_a, timeserie_b)
     self.assertEqual([(datetime(2011, 5, 30), 10)], list(result.events()))
 def test_f(self):
     """Test the sum of two non-empty time series."""
     timeserie_a = TimeseriesStub((datetime(2011, 5, 31), 10))
     timeserie_b = TimeseriesStub((datetime(2011, 5, 30), 20))
     result = raw_add_timeseries(timeserie_a, timeserie_b)
     self.assertEqual([(datetime(2011, 5, 30), 20), (datetime(2011, 5, 31), 10)], list(result.events()))
 def test_a(self):
     """Test the sum of two empty time series."""
     timeserie_a = TimeseriesStub()
     timeserie_b = TimeseriesStub()
     result = raw_add_timeseries(timeserie_a, timeserie_b)
     self.assertEqual([], list(result.events()))