Exemple #1
0
 def test_filter_grouping_average(self):
     # Only one of the three groupings meets condition
     expected = [[0, 1]]
     cond = 'PROMEDIO(col2) < 3'
     grouping = [[0, 1], [2, 3], [4, 5]]
     test = consult.filter_grps(cond, self.dtb1, grouping)
     # Assert that there are two groupings
     self.assertEqual(len(test), 1)
     self.assertEqual(test, expected)
Exemple #2
0
 def test_filter_grouping_min(self):
     # Only two of the three groupings meets condition
     expected = [[2, 3], [4, 5]]
     cond = 'MIN(col2) >= 2'
     grouping = [[0, 1], [2, 3], [4, 5]]
     test = consult.filter_grps(cond, self.dtb1, grouping)
     # Assert that there are two groupings
     self.assertEqual(len(test), 2)
     self.assertEqual(test, expected)