diff --git a/.gitignore b/.gitignore index dec61f1..0a76ed3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ __pycache__/ *.py[cod] *$py.class - +*.c # C extensions *.so .idea/ diff --git a/setup.cfg b/setup.cfg index dffcfdc..e47e06c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ # 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 diff --git a/tests/test_minijson.py b/tests/test_minijson.py index 3563240..0185028 100644 --- a/tests/test_minijson.py +++ b/tests/test_minijson.py @@ -5,6 +5,12 @@ 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))