Show More
@@ -1201,18 +1201,18 b' class TestResult(unittest._TextTestResul' | |||||
1201 | self.stream.write(line) |
|
1201 | self.stream.write(line) | |
1202 | self.stream.flush() |
|
1202 | self.stream.flush() | |
1203 |
|
1203 | |||
1204 |
|
|
1204 | # handle interactive prompt without releasing iolock | |
1205 |
|
|
1205 | if self._options.interactive: | |
1206 |
|
|
1206 | self.stream.write('Accept this change? [n] ') | |
1207 |
|
|
1207 | answer = sys.stdin.readline().strip() | |
1208 |
|
|
1208 | if answer.lower() in ('y', 'yes'): | |
1209 |
|
|
1209 | if test.name.endswith('.t'): | |
1210 |
|
|
1210 | rename(test.errpath, test.path) | |
1211 |
|
|
1211 | else: | |
1212 |
|
|
1212 | rename(test.errpath, '%s.out' % test.path) | |
1213 |
|
|
1213 | accepted = True | |
1214 |
|
|
1214 | if not accepted and not failed: | |
1215 |
|
|
1215 | self.faildata[test.name] = ''.join(lines) | |
1216 | iolock.release() |
|
1216 | iolock.release() | |
1217 |
|
1217 | |||
1218 | return accepted |
|
1218 | return accepted |
@@ -251,6 +251,18 b' Refuse the fix' | |||||
251 | This is a noop statement so that |
|
251 | This is a noop statement so that | |
252 | this test is still more bytes than success. |
|
252 | this test is still more bytes than success. | |
253 |
|
253 | |||
|
254 | Interactive with custom view | |||
|
255 | ||||
|
256 | $ echo 'n' | $TESTDIR/run-tests.py --with-hg=`which hg` -i --view echo | |||
|
257 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err | |||
|
258 | Accept this change? [n]* (glob) | |||
|
259 | ERROR: test-failure.t output changed | |||
|
260 | !. | |||
|
261 | Failed test-failure.t: output changed | |||
|
262 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | |||
|
263 | python hash seed: * (glob) | |||
|
264 | [1] | |||
|
265 | ||||
254 | View the fix |
|
266 | View the fix | |
255 |
|
267 | |||
256 | $ echo 'y' | $TESTDIR/run-tests.py --with-hg=`which hg` --view echo |
|
268 | $ echo 'y' | $TESTDIR/run-tests.py --with-hg=`which hg` --view echo |
General Comments 0
You need to be logged in to leave comments.
Login now