summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_lzma.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_lzma.py')
-rw-r--r--Lib/test/test_lzma.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_lzma.py b/Lib/test/test_lzma.py
index 18f474b..ac53bdd 100644
--- a/Lib/test/test_lzma.py
+++ b/Lib/test/test_lzma.py
@@ -380,6 +380,10 @@ class CompressorDecompressorTestCase(unittest.TestCase):
lzd.__init__()
self.assertAlmostEqual(gettotalrefcount() - refs_before, 0, delta=10)
+ def test_uninitialized_LZMADecompressor_crash(self):
+ self.assertEqual(LZMADecompressor.__new__(LZMADecompressor).
+ decompress(bytes()), b'')
+
class CompressDecompressFunctionTestCase(unittest.TestCase):