From f659f773b7713fab2bb02a4a26eefc9e002145ca Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 21 Apr 2016 11:53:55 -0700 Subject: [PATCH] Add "lzma" to "python-imports" test --- test/tests/python-imports/container.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/tests/python-imports/container.py b/test/tests/python-imports/container.py index a70826e83..8e6ad8068 100644 --- a/test/tests/python-imports/container.py +++ b/test/tests/python-imports/container.py @@ -4,5 +4,11 @@ import readline import bz2 assert(bz2.decompress(bz2.compress(b'IT WORKS IT WORKS IT WORKS')) == b'IT WORKS IT WORKS IT WORKS') +import platform +if platform.python_implementation() != 'PyPy' and platform.python_version_tuple()[0] != '2': + # PyPy and Python 2 don't support lzma + import lzma + assert(lzma.decompress(lzma.compress(b'IT WORKS IT WORKS IT WORKS')) == b'IT WORKS IT WORKS IT WORKS') + import zlib assert(zlib.decompress(zlib.compress(b'IT WORKS IT WORKS IT WORKS')) == b'IT WORKS IT WORKS IT WORKS')