def test_c(self): """Test the value before the second date & time is the first value.""" today = datetime(2010, 12, 20) timeserie = TimeseriesWithMemoryStub((today, 20.0), (today + timedelta(2), 30.0)) tomorrow = today + timedelta(1) self.assertAlmostEqual(20.0, timeserie.get_value(tomorrow))
def test_a(self): """Test the value on the first date is the first value.""" today = datetime(2010, 12, 20) timeserie = TimeseriesWithMemoryStub((today, 20.0)) self.assertAlmostEqual(20.0, timeserie.get_value(today))