Exemplo n.º 1
0
 def test_pow(self):
     seriesList = self._generate_series_list()
     factor = 2
     # Leave the original seriesList undisturbed for verification
     results = functions.pow({}, copy.deepcopy(seriesList), factor)
     for i, series in enumerate(results):
         for counter, value in enumerate(series):
             if value is None:
                 continue
             original_value = seriesList[i][counter]
             expected_value = math.pow(original_value, factor)
             self.assertEqual(value, expected_value)
Exemplo n.º 2
0
 def test_pow(self):
     seriesList = self._generate_series_list()
     factor = 2
     # Leave the original seriesList undisturbed for verification
     results = functions.pow({}, copy.deepcopy(seriesList), factor)
     for i, series in enumerate(results):
         for counter, value in enumerate(series):
             if value is None:
                 continue
             original_value = seriesList[i][counter]
             expected_value = math.pow(original_value, factor)
             self.assertEqual(value, expected_value)