diff options
Diffstat (limited to 'tests/cpydiff/modules_json_nonserializable.py')
| -rw-r--r-- | tests/cpydiff/modules_json_nonserializable.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/cpydiff/modules_json_nonserializable.py b/tests/cpydiff/modules_json_nonserializable.py new file mode 100644 index 000000000..913b734e8 --- /dev/null +++ b/tests/cpydiff/modules_json_nonserializable.py @@ -0,0 +1,14 @@ +""" +categories: Modules,json +description: JSON module does not throw exception when object is not serialisable +cause: Unknown +workaround: Unknown +""" +import json +a = bytes(x for x in range(256)) +try: + z = json.dumps(a) + x = json.loads(z) + print('Should not get here') +except TypeError: + print('TypeError') |
