Show More
@@ -993,6 +993,11 b' class TestResult(unittest._TextTestResul' | |||
|
993 | 993 | # polyfill it. |
|
994 | 994 | self.skipped = [] |
|
995 | 995 | |
|
996 | # We have a custom "ignored" result that isn't present in any Python | |
|
997 | # unittest implementation. It is very similar to skipped. It may make | |
|
998 | # sense to map it into skip some day. | |
|
999 | self.ignored = [] | |
|
1000 | ||
|
996 | 1001 | # Polyfill. |
|
997 | 1002 | def addSkip(self, test, reason): |
|
998 | 1003 | self.skipped.append((test, reason)) |
@@ -1003,6 +1008,15 b' class TestResult(unittest._TextTestResul' | |||
|
1003 | 1008 | self.stream.write('s') |
|
1004 | 1009 | self.stream.flush() |
|
1005 | 1010 | |
|
1011 | def addIgnore(self, test, reason): | |
|
1012 | self.ignored.append((test, reason)) | |
|
1013 | ||
|
1014 | if self.showAll: | |
|
1015 | self.stream.writeln('ignored %s' % reason) | |
|
1016 | else: | |
|
1017 | self.stream.write('i') | |
|
1018 | self.stream.flush() | |
|
1019 | ||
|
1006 | 1020 | class TextTestRunner(unittest.TextTestRunner): |
|
1007 | 1021 | """Custom unittest test runner that uses appropriate settings.""" |
|
1008 | 1022 | |
@@ -1305,7 +1319,7 b' class TestRunner(object):' | |||
|
1305 | 1319 | elif code == 's': |
|
1306 | 1320 | self._result.addSkip(self, msg) |
|
1307 | 1321 | elif code == 'i': |
|
1308 | pass | |
|
1322 | self._result.addIgnore(self, msg) | |
|
1309 | 1323 | else: |
|
1310 | 1324 | self.fail('Unknown test result code: %s' % code) |
|
1311 | 1325 |
General Comments 0
You need to be logged in to leave comments.
Login now