فهرست منبع

Add "lzma" to "python-imports" test

Tianon Gravi 9 سال پیش
والد
کامیت
f659f773b7
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      test/tests/python-imports/container.py

+ 6 - 0
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')