Show More
@@ -989,6 +989,20 b' class TestResult(unittest._TextTestResul' | |||
|
989 | 989 | def __init__(self, *args, **kwargs): |
|
990 | 990 | super(TestResult, self).__init__(*args, **kwargs) |
|
991 | 991 | |
|
992 | # unittest.TestResult didn't have skipped until 2.7. We need to | |
|
993 | # polyfill it. | |
|
994 | self.skipped = [] | |
|
995 | ||
|
996 | # Polyfill. | |
|
997 | def addSkip(self, test, reason): | |
|
998 | self.skipped.append((test, reason)) | |
|
999 | ||
|
1000 | if self.showAll: | |
|
1001 | self.stream.writeln('skipped %s' % reason) | |
|
1002 | else: | |
|
1003 | self.stream.write('s') | |
|
1004 | self.stream.flush() | |
|
1005 | ||
|
992 | 1006 | class TextTestRunner(unittest.TextTestRunner): |
|
993 | 1007 | """Custom unittest test runner that uses appropriate settings.""" |
|
994 | 1008 | |
@@ -1289,7 +1303,7 b' class TestRunner(object):' | |||
|
1289 | 1303 | elif code == '.': |
|
1290 | 1304 | pass |
|
1291 | 1305 | elif code == 's': |
|
1292 |
|
|
|
1306 | self._result.addSkip(self, msg) | |
|
1293 | 1307 | elif code == 'i': |
|
1294 | 1308 | pass |
|
1295 | 1309 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now