equal
deleted
inserted
replaced
963 decoder.decode(encoded[start:start + step]) |
963 decoder.decode(encoded[start:start + step]) |
964 start += step |
964 start += step |
965 |
965 |
966 self.assertEqual(decoder.getavailable(), [source]) |
966 self.assertEqual(decoder.getavailable(), [source]) |
967 |
967 |
|
968 def testbytearray(self): |
|
969 source = b''.join(cborutil.streamencode(b'foobar')) |
|
970 |
|
971 decoder = cborutil.bufferingdecoder() |
|
972 decoder.decode(bytearray(source)) |
|
973 |
|
974 self.assertEqual(decoder.getavailable(), [b'foobar']) |
|
975 |
968 class DecodeallTests(TestCase): |
976 class DecodeallTests(TestCase): |
969 def testemptyinput(self): |
977 def testemptyinput(self): |
970 self.assertEqual(cborutil.decodeall(b''), []) |
978 self.assertEqual(cborutil.decodeall(b''), []) |
971 |
979 |
972 def testpartialinput(self): |
980 def testpartialinput(self): |