tests/test-cbor.py
changeset 40124 b638219a23c3
parent 39413 babad5ebaf0a
child 41160 a9905045b992
--- a/tests/test-cbor.py	Mon Oct 08 17:06:24 2018 -0700
+++ b/tests/test-cbor.py	Thu Oct 04 15:08:42 2018 -0700
@@ -965,6 +965,14 @@
 
             self.assertEqual(decoder.getavailable(), [source])
 
+    def testbytearray(self):
+        source = b''.join(cborutil.streamencode(b'foobar'))
+
+        decoder = cborutil.bufferingdecoder()
+        decoder.decode(bytearray(source))
+
+        self.assertEqual(decoder.getavailable(), [b'foobar'])
+
 class DecodeallTests(TestCase):
     def testemptyinput(self):
         self.assertEqual(cborutil.decodeall(b''), [])