diff options
Diffstat (limited to 'Lib/test/test_lzma.py')
| -rw-r--r-- | Lib/test/test_lzma.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_lzma.py b/Lib/test/test_lzma.py index a13cf3b..ad90456 100644 --- a/Lib/test/test_lzma.py +++ b/Lib/test/test_lzma.py @@ -1,5 +1,6 @@ from io import BytesIO, UnsupportedOperation import os +import pickle import random import unittest @@ -216,6 +217,14 @@ class CompressorDecompressorTestCase(unittest.TestCase): finally: input = cdata = ddata = None + # Pickling raises an exception; there's no way to serialize an lzma_stream. + + def test_pickle(self): + with self.assertRaises(TypeError): + pickle.dumps(LZMACompressor()) + with self.assertRaises(TypeError): + pickle.dumps(LZMADecompressor()) + class CompressDecompressFunctionTestCase(unittest.TestCase): |
