[Python-checkins] cpython: Issue #19648: implement empty tests in pickletester. Patch by Gennadiy Zlobin.

antoine.pitrou python-checkins at python.org
Sat Dec 28 17:00:23 CET 2013


http://hg.python.org/cpython/rev/fef075ddaec9
changeset:   88211:fef075ddaec9
parent:      88209:d766589ed5a2
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sat Dec 28 16:57:37 2013 +0100
summary:
  Issue #19648: implement empty tests in pickletester.  Patch by Gennadiy Zlobin.

files:
  Lib/test/pickletester.py |  12 ++++++++++--
  Misc/ACKS                |   1 +
  2 files changed, 11 insertions(+), 2 deletions(-)


diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -812,10 +812,18 @@
         self.assertEqual(self.dumps(1.2, 0)[0:3], b'F1.')
 
     def test_reduce(self):
-        pass
+        for proto in protocols:
+            inst = AAA()
+            dumped = self.dumps(inst, proto)
+            loaded = self.loads(dumped)
+            self.assertEqual(loaded, REDUCE_A)
 
     def test_getinitargs(self):
-        pass
+        for proto in protocols:
+            inst = initarg(1, 2)
+            dumped = self.dumps(inst, proto)
+            loaded = self.loads(dumped)
+            self.assert_is_copy(inst, loaded)
 
     def test_pop_empty_stack(self):
         # Test issue7455
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1456,4 +1456,5 @@
 Cheng Zhang
 Kai Zhu
 Tarek Ziadé
+Gennadiy Zlobin
 Peter Åstrand

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list