changeset 37899:2b3b6187c316

tests: port test-cbor.py to Python 3 I suspect this b''.join() was a remnant of an earlier iteration of this code, as it was building a string from a string. Differential Revision: https://phab.mercurial-scm.org/D3505
author Augie Fackler <augie@google.com>
date Fri, 27 Apr 2018 11:07:24 -0400
parents 2ae6a3134362
children b3ffa2faae04
files contrib/python3-whitelist tests/test-cbor.py
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/python3-whitelist	Fri Apr 27 11:06:49 2018 -0400
+++ b/contrib/python3-whitelist	Fri Apr 27 11:07:24 2018 -0400
@@ -36,6 +36,7 @@
 test-cappedreader.py
 test-casecollision.t
 test-cat.t
+test-cbor.py
 test-censor.t
 test-changelog-exec.t
 test-check-commit.t
--- a/tests/test-cbor.py	Fri Apr 27 11:06:49 2018 -0400
+++ b/tests/test-cbor.py	Fri Apr 27 11:07:24 2018 -0400
@@ -69,7 +69,7 @@
 
         dest = b''.join(cborutil.streamencodeindefinitebytestring(
             source, chunksize=42))
-        self.assertEqual(cbor.loads(dest), b''.join(source))
+        self.assertEqual(cbor.loads(dest), source)
 
     def testreadtoiter(self):
         source = io.BytesIO(b'\x5f\x44\xaa\xbb\xcc\xdd\x43\xee\xff\x99\xff')