diff options
author | Pieter Mulder <pmulder@proigia.nl> | 2016-06-29 13:21:58 +0200 |
---|---|---|
committer | Pieter Mulder <pmulder@proigia.nl> | 2016-06-29 13:21:58 +0200 |
commit | 94e4948ed4c7ea6fed28fe315f350efed6e3ca9d (patch) | |
tree | 39c355ca0923003af46089f9915e2792a0e66135 /test/base/test_utils.py | |
parent | 7c74d702a9632a8c7264d6972e46985de3fb2487 (diff) | |
download | sqlalchemy-pr/286.tar.gz |
Fix #3728 Pickle of Properties object failspr/286
Diffstat (limited to 'test/base/test_utils.py')
-rw-r--r-- | test/base/test_utils.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/base/test_utils.py b/test/base/test_utils.py index fcb9a59a3..1339329e1 100644 --- a/test/base/test_utils.py +++ b/test/base/test_utils.py @@ -2256,3 +2256,13 @@ class TestClassProperty(fixtures.TestBase): eq_(B.something, {'foo': 1, 'bazz': 2}) +class TestProperties(fixtures.TestBase): + + def test_pickle(self): + data = {'hello': 'bla'} + props = util.Properties(data) + for protocol in -1, 0, 1, 2: + print(protocol) + s = util.pickle.dumps(props, protocol) + p = util.pickle.loads(s) + assert props._data == p._data |