def testSum(self):

        assertEqual = self.assertEqual

        # Regular input
        values = [2, 1.7, 3, 1]
        aggregate = S3GroupAggregate("sum", "Example", values)
        assertEqual(aggregate.result, 7.7)

        # Empty input
        values = []
        aggregate = S3GroupAggregate("sum", "Example", values)
        assertEqual(aggregate.result, 0.0)

        # Non-numeric type (e.g. returned from virtual fields)
        values = ["1", "other"]
        aggregate = S3GroupAggregate("sum", "Example", values)
        assertEqual(aggregate.result, 0.0)

        # None gives always None
        values = None
        aggregate = S3GroupAggregate("sum", "Example", values)
        assertEqual(aggregate.result, None)

    # -------------------------------------------------------------------------
Add a new error suppression flag.
dataset/ETHPy150Open sahana/eden/modules/unit_tests/s3/s3grouped.py/S3GroupAggregateTests.testSum--crossover with--dataset/ETHPy150Open google/closure-linter/closure_linter/statetracker.py/DocComment.AddSuppression