Mercurial > hg > mercurial-source
comparison tests/run-tests.py @ 21387:82f8d4e95c87
run-test: fix AttributeError in the --interactive prompt
One must choose between ``"y yes".split()`` and ``('y', 'yes')``. I choose the
later.
The feature still crash when you answer "yes" to use it. But at least, the
prompt itself works.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sat, 17 May 2014 00:38:48 -0700 |
parents | 3b0c522f04aa |
children | 9a1e3d705c2c |
comparison
equal
deleted
inserted
replaced
21386:3b0c522f04aa | 21387:82f8d4e95c87 |
---|---|
586 os.path.exists(self._errpath)): | 586 os.path.exists(self._errpath)): |
587 iolock.acquire() | 587 iolock.acquire() |
588 print 'Accept this change? [n] ', | 588 print 'Accept this change? [n] ', |
589 answer = sys.stdin.readline().strip() | 589 answer = sys.stdin.readline().strip() |
590 iolock.release() | 590 iolock.release() |
591 if answer.lower() in ('y', 'yes').split(): | 591 if answer.lower() in ('y', 'yes'): |
592 if self._test.endswith('.t'): | 592 if self._test.endswith('.t'): |
593 rename(self._errpath, self._testpath) | 593 rename(self._errpath, self._testpath) |
594 else: | 594 else: |
595 rename(self._errpath, '%s.out' % self._testpath) | 595 rename(self._errpath, '%s.out' % self._testpath) |
596 | 596 |