diff options
Diffstat (limited to 'Lib/test/test_bz2.py')
-rw-r--r-- | Lib/test/test_bz2.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py index 40d8425..ce012d6 100644 --- a/Lib/test/test_bz2.py +++ b/Lib/test/test_bz2.py @@ -646,8 +646,9 @@ class BZ2CompressorTest(BaseTest): data = None def testPickle(self): - with self.assertRaises(TypeError): - pickle.dumps(BZ2Compressor()) + for proto in range(pickle.HIGHEST_PROTOCOL + 1): + with self.assertRaises(TypeError): + pickle.dumps(BZ2Compressor(), proto) class BZ2DecompressorTest(BaseTest): @@ -702,8 +703,9 @@ class BZ2DecompressorTest(BaseTest): decompressed = None def testPickle(self): - with self.assertRaises(TypeError): - pickle.dumps(BZ2Decompressor()) + for proto in range(pickle.HIGHEST_PROTOCOL + 1): + with self.assertRaises(TypeError): + pickle.dumps(BZ2Decompressor(), proto) class CompressDecompressTest(BaseTest): |