Mercurial > hg
diff tests/testlib/badserverext.py @ 48615:e38776a4c2cb
test-http-bad-server: replace the default 65537 value in output
This is the default block value that we use here and it make the output overall
less readable. So we replace it with `~`
Differential Revision: https://phab.mercurial-scm.org/D12046
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 21 Jan 2022 11:58:55 +0100 |
parents | 3efc8644dd00 |
children | 98c502a2c462 |
line wrap: on
line diff
--- a/tests/testlib/badserverext.py Fri Jan 21 11:15:56 2022 +0100 +++ b/tests/testlib/badserverext.py Fri Jan 21 11:58:55 2022 +0100 @@ -172,12 +172,16 @@ remaining -= len(result) self.remaining_recv_bytes = remaining + if requested_size == 65537: + requested_repr = b'~' + else: + requested_repr = b'%d' % requested_size if requested_size == actual_size: - msg = b'%s(%d) -> (%d) %s' - msg %= (bmethod, requested_size, len(result), result) + msg = b'%s(%s) -> (%d) %s' + msg %= (bmethod, requested_repr, len(result), result) else: - msg = b'%s(%d from %d) -> (%d) %s' - msg %= (bmethod, actual_size, requested_size, len(result), result) + msg = b'%s(%d from %s) -> (%d) %s' + msg %= (bmethod, actual_size, requested_repr, len(result), result) obj._writelog(msg) if remaining is not None and remaining <= 0: