Skip to content

Commit

Permalink
Fix forgotten test, string majority/minority now are valid aggregates
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus authored and nyalldawson committed Mar 30, 2020
1 parent faaff32 commit 27d99db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/src/python/test_qgsaggregatecalculator.py
Expand Up @@ -212,8 +212,6 @@ def testString(self):
QgsAggregateCalculator.StDev,
QgsAggregateCalculator.StDevSample,
QgsAggregateCalculator.Range,
QgsAggregateCalculator.Minority,
QgsAggregateCalculator.Majority,
QgsAggregateCalculator.FirstQuartile,
QgsAggregateCalculator.ThirdQuartile,
QgsAggregateCalculator.InterQuartileRange
Expand All @@ -232,6 +230,10 @@ def testString(self):
self.assertEqual(val, ['', '', 'aaaa', 'aaaa', 'bbbbbbbb', 'cc', 'dddd', 'eeee', 'eeee'])
val, ok = agg.calculate(QgsAggregateCalculator.StringConcatenate, 'fldstring')
self.assertEqual(val, 'aaaaaaaabbbbbbbbccddddeeeeeeee')
val, ok = agg.calculate(QgsAggregateCalculator.Minority, 'fldstring')
self.assertEqual(val, 'bbbbbbbb')
val, ok = agg.calculate(QgsAggregateCalculator.Majority, 'fldstring')
self.assertEqual(val, '')

def testDateTime(self):
""" Test calculation of aggregates on date/datetime fields"""
Expand Down

0 comments on commit 27d99db

Please sign in to comment.