diff --git a/.gitignore b/.gitignore index dec61f13bc5dabaf9b5fcd63a3de67d5d118a603..0a76ed3e10b84edc75db7c0082eb60c578b96704 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 dffcfdc05c9863ba5a3f74bdb47fc1b57db938d1..e47e06c47f9abc446e61a6e481d644ff5ca91f9e 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 356324015552e33587c9997d090b0c07c70a77dd..0185028d7495a002ef09619dae5588832e3674c8 100644 --- a/tests/test_minijson.py +++ b/tests/test_minijson.py @@ -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))