Files
youknowdot 498adff3a9 Align JSON array hooks and libraries with Python 3.15 (#9135)
Generate the JSON library and selected tests with update_lib from CPython d220409a13b77de7a6c30abe16ea90db01528edc, preserving native bootstrap workarounds and test markers. Exclude generated cache directories at the library copy boundary.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 07:32:30 +00:00

15 lines
417 B
Python
Vendored

import json
import pickle
import unittest
class TestPickleable(unittest.TestCase):
def test_json_decode_error_is_pickleable(self):
e = json.JSONDecodeError(msg="abc", doc="def", pos=7)
pickled = pickle.dumps(e)
unpickled = pickle.loads(pickled)
self.assertEqual(unpickled.msg, e.msg)
self.assertEqual(unpickled.doc, e.doc)
self.assertEqual(unpickled.pos, e.pos)