Exemple #1
0
 def test_cannot_remove_all_rows(self):
     model = TimeSeriesModelVariableResolution(
         TimeSeriesVariableResolution(
             ["2019-07-05T12:00", "2019-07-21T08:15", "2019-07-23T09:10"],
             [2.3, -5.0, 7.0], True, False))
     self.assertTrue(model.removeRows(0, 3))
     self.assertEqual(
         model.value,
         TimeSeriesVariableResolution(["2019-07-05T12:00"], [2.3], True,
                                      False))
Exemple #2
0
 def test_removeRows_from_the_middle(self):
     model = TimeSeriesModelVariableResolution(
         TimeSeriesVariableResolution(
             ["2019-07-05T12:00", "2019-07-21T08:15", "2019-07-23T09:10"],
             [2.3, -5.0, 7.0], True, False))
     self.assertTrue(model.removeRows(1, 1))
     self.assertEqual(
         model.value,
         TimeSeriesVariableResolution(
             ["2019-07-05T12:00", "2019-07-23T09:10"], [2.3, 7.0], True,
             False))
Exemple #3
0
 def test_removing_last_row_fails(self):
     model = TimeSeriesModelVariableResolution(
         TimeSeriesVariableResolution(["2019-07-05T12:00"], [2.3], True,
                                      False))
     self.assertFalse(model.removeRows(0, 1))