diff options
author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2008-12-27 04:21:44 (GMT) |
---|---|---|
committer | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2008-12-27 04:21:44 (GMT) |
commit | 801f9d3888f4e2f44fe5aa7e9e46f8620a60702f (patch) | |
tree | 2f03e47c1ac595cb6db3fdeb1c5354753b2d0307 /Lib/test/test_deque.py | |
parent | 81d90a220f2cea407e261a3c884d388a084d2d1e (diff) | |
download | cpython-801f9d3888f4e2f44fe5aa7e9e46f8620a60702f.zip cpython-801f9d3888f4e2f44fe5aa7e9e46f8620a60702f.tar.gz cpython-801f9d3888f4e2f44fe5aa7e9e46f8620a60702f.tar.bz2 |
Issue #4740: Use HIGHEST_PROTOCOL in pickle test. This enables test for protocol 3
(== HIGHEST_PROTOCOL in 3.x)
Diffstat (limited to 'Lib/test/test_deque.py')
-rw-r--r-- | Lib/test/test_deque.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_deque.py b/Lib/test/test_deque.py index 1ac43da..7af0803 100644 --- a/Lib/test/test_deque.py +++ b/Lib/test/test_deque.py @@ -375,7 +375,7 @@ class TestBasic(unittest.TestCase): def test_pickle(self): d = deque(range(200)) - for i in (0, 1, 2): + for i in range(pickle.HIGHEST_PROTOCOL + 1): s = pickle.dumps(d, i) e = pickle.loads(s) self.assertNotEqual(id(d), id(e)) @@ -384,7 +384,7 @@ class TestBasic(unittest.TestCase): ## def test_pickle_recursive(self): ## d = deque('abc') ## d.append(d) -## for i in (0, 1, 2): +## for i in range(pickle.HIGHEST_PROTOCOL + 1): ## e = pickle.loads(pickle.dumps(d, i)) ## self.assertNotEqual(id(d), id(e)) ## self.assertEqual(id(e), id(e[-1])) |