equal
deleted
inserted
replaced
1081 if self._options.first: |
1081 if self._options.first: |
1082 self.stop() |
1082 self.stop() |
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): |
1089 super(TestResult, self).addError(*args, **kwargs) |
1103 super(TestResult, self).addError(*args, **kwargs) |
1090 |
1104 |
1143 self.stream.flush() |
1157 self.stream.flush() |
1144 |
1158 |
1145 if ret or not self._options.interactive or \ |
1159 if ret or not self._options.interactive or \ |
1146 not os.path.exists(test.errpath): |
1160 not os.path.exists(test.errpath): |
1147 return |
1161 return |
1148 |
|
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 |
1162 |
1159 def startTest(self, test): |
1163 def startTest(self, test): |
1160 super(TestResult, self).startTest(test) |
1164 super(TestResult, self).startTest(test) |
1161 |
1165 |
1162 self._started[test.name] = time.time() |
1166 self._started[test.name] = time.time() |