コード例 #1
0
 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))
コード例 #2
0
 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))
コード例 #3
0
 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))
コード例 #4
0
 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))