(self)
| 52 | cls.violations.append(err) |
| 53 | |
| 54 | def test_violations(self): |
| 55 | if self.violations: |
| 56 | counts = dict() |
| 57 | |
| 58 | for err in self.violations: |
| 59 | counts[err.code] = counts.get(err.code, 0) + 1 |
| 60 | print(err) |
| 61 | |
| 62 | for n, code in sorted([(n, code) for code, n in counts.items()], reverse=True): |
| 63 | p = lookup_error_params(code) |
| 64 | print('%s %8d %s' % (code, n, p.short_desc)) |
| 65 | |
| 66 | raise Exception('PyDoc Coding Style: %d violations have been found' % (len(self.violations))) |
| 67 | |
| 68 | |
| 69 | if __name__ == '__main__': |
nothing calls this directly
no test coverage detected