summaryrefslogtreecommitdiffstats
path: root/Lib/test/pickletester.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2004-07-27 05:22:33 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2004-07-27 05:22:33 (GMT)
commit544f1195b113688008e23d86f8ee5a5a8537645f (patch)
treec5e30d3e85ae6b106a558774f0de7262fcaf26f9 /Lib/test/pickletester.py
parent7b9190b8fc416f97c17ca6461dd73967813516c7 (diff)
downloadcpython-544f1195b113688008e23d86f8ee5a5a8537645f.zip
cpython-544f1195b113688008e23d86f8ee5a5a8537645f.tar.gz
cpython-544f1195b113688008e23d86f8ee5a5a8537645f.tar.bz2
Patch #995766: Keyword argument support in cPickle.
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r--Lib/test/pickletester.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index 6e6d97d..85e1dea 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -916,6 +916,16 @@ class AbstractPickleModuleTests(unittest.TestCase):
# Of course this needs to be changed when HIGHEST_PROTOCOL changes.
self.assertEqual(self.module.HIGHEST_PROTOCOL, 2)
+ def test_callapi(self):
+ from cStringIO import StringIO
+ f = StringIO()
+ # With and without keyword arguments
+ self.module.dump(123, f, -1)
+ self.module.dump(123, file=f, protocol=-1)
+ self.module.dumps(123, -1)
+ self.module.dumps(123, protocol=-1)
+ self.module.Pickler(f, -1)
+ self.module.Pickler(f, protocol=-1)
class AbstractPersistentPicklerTests(unittest.TestCase):