Show More
@@ -1083,6 +1083,20 b' class TestResult(unittest._TextTestResul' | |||||
1083 | else: |
|
1083 | else: | |
1084 | if not self._options.nodiff: |
|
1084 | if not self._options.nodiff: | |
1085 | self.stream.write('\nERROR: %s output changed\n' % test) |
|
1085 | self.stream.write('\nERROR: %s output changed\n' % test) | |
|
1086 | ||||
|
1087 | if self._options.interactive: | |||
|
1088 | iolock.acquire() | |||
|
1089 | self.stream.write('Accept this change? [n] ') | |||
|
1090 | answer = sys.stdin.readline().strip() | |||
|
1091 | iolock.release() | |||
|
1092 | if answer.lower() in ('y', 'yes'): | |||
|
1093 | if test.name.endswith('.t'): | |||
|
1094 | rename(test.errpath, test.path) | |||
|
1095 | else: | |||
|
1096 | rename(test.errpath, '%s.out' % test.path) | |||
|
1097 | self.failures.pop() | |||
|
1098 | return 1 | |||
|
1099 | ||||
1086 | self.stream.write('!') |
|
1100 | self.stream.write('!') | |
1087 |
|
1101 | |||
1088 | def addError(self, *args, **kwargs): |
|
1102 | def addError(self, *args, **kwargs): | |
@@ -1146,16 +1160,6 b' class TestResult(unittest._TextTestResul' | |||||
1146 | not os.path.exists(test.errpath): |
|
1160 | not os.path.exists(test.errpath): | |
1147 | return |
|
1161 | return | |
1148 |
|
1162 | |||
1149 | iolock.acquire() |
|
|||
1150 | print 'Accept this change? [n] ', |
|
|||
1151 | answer = sys.stdin.readline().strip() |
|
|||
1152 | iolock.release() |
|
|||
1153 | if answer.lower() in ('y', 'yes'): |
|
|||
1154 | if test.name.endswith('.t'): |
|
|||
1155 | rename(test.errpath, test.path) |
|
|||
1156 | else: |
|
|||
1157 | rename(test.errpath, '%s.out' % test.path) |
|
|||
1158 |
|
||||
1159 | def startTest(self, test): |
|
1163 | def startTest(self, test): | |
1160 | super(TestResult, self).startTest(test) |
|
1164 | super(TestResult, self).startTest(test) | |
1161 |
|
1165 |
General Comments 0
You need to be logged in to leave comments.
Login now