Mercurial > hg-stable
changeset 41490:fd2f1f0071b9
py3: fix up test-remotefilelog-cacheprocess.t to not depend on a repr
It looks like the repr() of Exceptions is different from Python 2 to
Python 3.7 (but not 3.5?), but the str() is still stable. Sigh.
Differential Revision: https://phab.mercurial-scm.org/D5761
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 30 Jan 2019 16:43:52 -0500 |
parents | 30b762a330c8 |
children | 4caf56c33009 |
files | tests/test-remotefilelog-cacheprocess.t |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-remotefilelog-cacheprocess.t Wed Jan 30 13:36:51 2019 -0800 +++ b/tests/test-remotefilelog-cacheprocess.t Wed Jan 30 16:43:52 2019 -0500 @@ -56,11 +56,11 @@ > log('requested %r\n' % key) > sys.stdout.flush() > elif cmd == 'set': - > assert False, 'todo writing' + > raise Exception('todo writing') > else: - > assert False, 'unknown command! %r' % cmd + > raise Exception('unknown command! %r' % cmd) > except Exception as e: - > log('Exception! %r\n' % e) + > log('Exception! %s\n' % e) > raise > EOF @@ -79,7 +79,7 @@ requested 'master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a' requested 'master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca' got command 'set' - Exception! AssertionError('todo writing',) + Exception! todo writing Test cache hits. $ mv hgcache oldhgcache @@ -110,7 +110,7 @@ requested 'y\x00master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca' requested 'z\x00master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a' got command 'set' - Exception! AssertionError('todo writing',) + Exception! todo writing Test cache hits with includepath. $ mv hgcache oldhgcache