diff options
| author | Sergey Fedoseev <fedoseev.sergey@gmail.com> | 2017-07-12 15:18:49 +0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-07-12 09:30:29 -0400 |
| commit | 83440a1258ab2e0c29ce2c5d3586456ece20b633 (patch) | |
| tree | 51fbe9e7161187c355820d6a18715c49e677fa04 /tests/utils_tests | |
| parent | 59a4b12a2356633936e6888641c2a3a9232a0bdd (diff) | |
Refs #28389 -- Added release note and test for pickling of LazyObject when wrapped object doesn't have __reduce__().
Forwardport of 30f334cc58e939c7d9bd8455c80bd066fbde9f2b from stable/1.11.x
Diffstat (limited to 'tests/utils_tests')
| -rw-r--r-- | tests/utils_tests/test_lazyobject.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/utils_tests/test_lazyobject.py b/tests/utils_tests/test_lazyobject.py index 4a4e929cda..2bba558843 100644 --- a/tests/utils_tests/test_lazyobject.py +++ b/tests/utils_tests/test_lazyobject.py @@ -184,11 +184,13 @@ class LazyObjectTestCase(TestCase): def test_pickle(self): # See ticket #16563 obj = self.lazy_wrap(Foo()) + obj.bar = 'baz' pickled = pickle.dumps(obj) unpickled = pickle.loads(pickled) self.assertIsInstance(unpickled, Foo) self.assertEqual(unpickled, obj) self.assertEqual(unpickled.foo, obj.foo) + self.assertEqual(unpickled.bar, obj.bar) # Test copying lazy objects wrapping both builtin types and user-defined # classes since a lot of the relevant code does __dict__ manipulation and |
