diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-22 21:41:05 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-22 21:41:05 (GMT) |
commit | ff150f2921e554f61ac5452757bd39d881bf1a5f (patch) | |
tree | 5c8d47f4d426cd3c1f5975ce2aa4aa181b878e9b /Lib/test/pickletester.py | |
parent | 45f9cf96cd061b67c0dd316261971aeed767af66 (diff) | |
download | cpython-ff150f2921e554f61ac5452757bd39d881bf1a5f.zip cpython-ff150f2921e554f61ac5452757bd39d881bf1a5f.tar.gz cpython-ff150f2921e554f61ac5452757bd39d881bf1a5f.tar.bz2 |
Revert r85797 (and r85798): it broke the Windows buildbots because of
test_multiprocessing's misbehaviour.
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r-- | Lib/test/pickletester.py | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index e21d490..7645b54 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -3,7 +3,6 @@ import unittest import pickle import pickletools import copyreg -import weakref from http.cookies import SimpleCookie from test.support import TestFailed, TESTFN, run_with_locale @@ -843,25 +842,6 @@ class AbstractPickleTests(unittest.TestCase): self.assertEqual(B(x), B(y), detail) self.assertEqual(x.__dict__, y.__dict__, detail) - def test_newobj_proxies(self): - # NEWOBJ should use the __class__ rather than the raw type - classes = myclasses[:] - # Cannot create weakproxies to these classes - for c in (MyInt, MyTuple): - classes.remove(c) - for proto in protocols: - for C in classes: - B = C.__base__ - x = C(C.sample) - x.foo = 42 - p = weakref.proxy(x) - s = self.dumps(p, proto) - y = self.loads(s) - self.assertEqual(type(y), type(x)) # rather than type(p) - detail = (proto, C, B, x, y, type(y)) - self.assertEqual(B(x), B(y), detail) - self.assertEqual(x.__dict__, y.__dict__, detail) - # Register a type with copyreg, with extension code extcode. Pickle # an object of that type. Check that the resulting pickle uses opcode # (EXT[124]) under proto 2, and not in proto 1. @@ -1028,6 +1008,7 @@ class AbstractPickleTests(unittest.TestCase): self.assertRaises(RuntimeError, self.dumps, x, proto) # protocol 2 don't raise a RuntimeError. d = self.dumps(x, 2) + self.assertRaises(RuntimeError, self.loads, d) def test_reduce_bad_iterator(self): # Issue4176: crash when 4th and 5th items of __reduce__() |