container.py 639 B

1234567891011121314151617181920212223
  1. import curses
  2. import readline
  3. import bz2
  4. assert(bz2.decompress(bz2.compress(b'IT WORKS IT WORKS IT WORKS')) == b'IT WORKS IT WORKS IT WORKS')
  5. import platform
  6. isNotPypy = platform.python_implementation() != 'PyPy'
  7. isCaveman = platform.python_version_tuple()[0] == '2'
  8. if isCaveman:
  9. import gdbm
  10. else:
  11. import dbm.gnu
  12. if isNotPypy:
  13. # PyPy and Python 2 don't support lzma
  14. import lzma
  15. assert(lzma.decompress(lzma.compress(b'IT WORKS IT WORKS IT WORKS')) == b'IT WORKS IT WORKS IT WORKS')
  16. import zlib
  17. assert(zlib.decompress(zlib.compress(b'IT WORKS IT WORKS IT WORKS')) == b'IT WORKS IT WORKS IT WORKS')