mirror of
https://github.com/progval/irctest.git
synced 2025-04-06 23:39:46 +00:00
Add an exception to tell a controller does not implement something.
This commit is contained in:
@ -2,6 +2,10 @@ import unittest
|
||||
import operator
|
||||
import itertools
|
||||
|
||||
class NotImplementedByController(unittest.SkipTest):
|
||||
def __str__(self):
|
||||
return 'Not implemented by controller: {}'.format(self.args[0])
|
||||
|
||||
class OptionalExtensionNotSupported(unittest.SkipTest):
|
||||
def __str__(self):
|
||||
return 'Unsupported extension: {}'.format(self.args[0])
|
||||
@ -19,6 +23,6 @@ class OptionalityReportingTextTestRunner(unittest.TextTestRunner):
|
||||
'specifications/mechanisms are not supported:')
|
||||
msg_to_tests = itertools.groupby(result.skipped,
|
||||
key=operator.itemgetter(1))
|
||||
for (msg, tests) in msg_to_tests:
|
||||
for (msg, tests) in sorted(msg_to_tests):
|
||||
print('\t{} ({} test(s))'.format(msg, sum(1 for x in tests)))
|
||||
return result
|
||||
|
Reference in New Issue
Block a user