summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-07-25 16:18:20 (GMT)
committerGitHub <noreply@github.com>2019-07-25 16:18:20 (GMT)
commit25cb4fd4fb0f44d2b6bf38379634f3d22b77aa17 (patch)
treee080f611ba9e8a7e211af2032956004a61bc3f07 /Lib
parent69802f6163c9f18ca0e0b9c4c43a49365fc63e2d (diff)
downloadcpython-25cb4fd4fb0f44d2b6bf38379634f3d22b77aa17.zip
cpython-25cb4fd4fb0f44d2b6bf38379634f3d22b77aa17.tar.gz
cpython-25cb4fd4fb0f44d2b6bf38379634f3d22b77aa17.tar.bz2
bpo-37502: handle default parameter for buffers argument of pickle.loads correctly (GH-14593)
(cherry picked from commit 898318b53d921298d1f1fcfa0f415844afbeb318) Co-authored-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/pickletester.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index f8f3bc9..2bc99e6 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -2765,6 +2765,11 @@ class AbstractPickleTests(unittest.TestCase):
with self.assertRaises(pickle.UnpicklingError):
self.loads(data, buffers=[])
+ def test_inband_accept_default_buffers_argument(self):
+ for proto in range(5, pickle.HIGHEST_PROTOCOL + 1):
+ data_pickled = self.dumps(1, proto, buffer_callback=None)
+ data = self.loads(data_pickled, buffers=None)
+
@unittest.skipIf(np is None, "Test needs Numpy")
def test_buffers_numpy(self):
def check_no_copy(x, y):