Skip to content
Snippets Groups Projects
Commit cf56b778 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

support 2.3

parent a3b0b760
No related branches found
Tags v2.3
No related merge requests found
......@@ -2,7 +2,7 @@
__pycache__/
*.py[cod]
*$py.class
*.c
# C extensions
*.so
.idea/
......
# coding: utf-8
[metadata]
version = 2.3a1
version = 2.3
name = minijson
long_description = file: README.md
long_description_content_type = text/markdown; charset=UTF-8
......
......@@ -5,6 +5,12 @@ from minijson import dumps, loads, dumps_object, loads_object, EncodingError, De
class TestMiniJSON(unittest.TestCase):
def test_accepts_bytearrays(self):
b = {'test': 'hello'}
a = dumps(b)
a = bytearray(a)
self.assertEqual(loads(a), b)
def assertLoadingIsDecodingError(self, b: bytes):
self.assertRaises(DecodingError, lambda: loads(b))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment