summaryrefslogtreecommitdiffstats
path: root/Lib/test/pickletester.py
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2013-12-02 00:27:46 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2013-12-02 00:27:46 (GMT)
commit28d271ef6b0eb37e27b5b3234ba146922b11d89f (patch)
tree393534e42e54081b2b542398e6d3cdcc368688a5 /Lib/test/pickletester.py
parent53dd8167ff548233373a75c4884ae5490b91f010 (diff)
downloadcpython-28d271ef6b0eb37e27b5b3234ba146922b11d89f.zip
cpython-28d271ef6b0eb37e27b5b3234ba146922b11d89f.tar.gz
cpython-28d271ef6b0eb37e27b5b3234ba146922b11d89f.tar.bz2
Issue #19754: Make pickletools.optimize respect the frame size target.
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r--Lib/test/pickletester.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index 999eab0..d07bc92 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -1343,12 +1343,6 @@ class AbstractPickleTests(unittest.TestCase):
pickled = self.dumps(obj, proto)
unpickled = self.loads(pickled)
self.assertEqual(obj, unpickled)
- # Test the framing heuristic is sane,
- # assuming a given frame size target.
- if self.optimized:
- # These assumptions are currently invalid for optimized
- # pickles (see e.g. issue19754).
- continue
bytes_per_frame = (len(pickled) /
count_opcode(pickle.FRAME, pickled))
self.assertGreater(bytes_per_frame,
@@ -1365,12 +1359,7 @@ class AbstractPickleTests(unittest.TestCase):
unpickled = self.loads(pickled)
self.assertEqual(obj, unpickled)
n_frames = count_opcode(pickle.FRAME, pickled)
- if self.optimized:
- # At least one frame was emitted (see issue19754).
- self.assertGreaterEqual(n_frames, 1)
- else:
- # At least one frame was emitted per large bytes object.
- self.assertGreaterEqual(n_frames, len(obj))
+ self.assertGreaterEqual(n_frames, len(obj))
def test_optional_frames(self):
if pickle.HIGHEST_PROTOCOL < 4: