diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_slice.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_slice.py b/Lib/test/test_slice.py index 584e5c7..03fde32 100644 --- a/Lib/test/test_slice.py +++ b/Lib/test/test_slice.py @@ -236,8 +236,10 @@ class SliceTest(unittest.TestCase): self.assertEqual(tmp, [(slice(1, 2), 42)]) def test_pickle(self): + import pickle + s = slice(10, 20, 3) - for protocol in (0,1,2): + for protocol in range(pickle.HIGHEST_PROTOCOL + 1): t = loads(dumps(s, protocol)) self.assertEqual(s, t) self.assertEqual(s.indices(15), t.indices(15)) |