def _summarize(self):
        """Summarize the results.

        If any test failed, suite is also failed.
        If no failures, but any incomplete, suite is incomplete.
        If nothing passed (empty suite?) then suite is incomplete.
        If all tests passed, then suite is also passed.

        """
        resultset = {
            constants.FAILED: 0,
            constants.PASSED: 0,
            constants.INCOMPLETE: 0,
        }
        for entry in self._tests:
            if entry.result is None:
                resultset[constants.INCOMPLETE] += 1
            elif entry.result.is_failed():
                resultset[constants.FAILED] += 1
            elif entry.result.is_incomplete():
                resultset[constants.INCOMPLETE] += 1
            elif entry.result.is_passed():
                resultset[constants.PASSED] += 1
        if resultset[constants.FAILED] > 0:
            result = constants.FAILED
        elif resultset[constants.INCOMPLETE] > 0:
            result = constants.INCOMPLETE
        elif resultset[constants.PASSED] == 0:
            result = constants.INCOMPLETE
        else:
            result = constants.PASSED
        self.result = TestResult(result)
dataset/ETHPy150Open kdart/pycopia/QA/pycopia/QA/core.py/TestSuite._summarize/original