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