language: python
python:
  - "2.6"
  - "2.7"
  - "3.2"
  - "3.3"
  - "3.4"
  - "3.5"
  - "3.6"
  - "nightly"
sudo: false
addons:
  apt:
    packages:
    - liblzma-dev
install:
  - "python setup.py install"
before_script:
  - "cd test"
script:
  - "python test_lzma.py"

language: python
python:
  - "2.6"
  - "2.7"
  - "3.2"
  - "3.3"
  - "3.4"
  - "3.5"
  - "3.6"
  - "nightly"
  - "pypy"
  - "pypy3"
matrix:
  allow_failures:
  - python: "pypy"
  - python: "pypy3"
  fast_finish: true

sudo: false
addons:
  apt:
    packages:
    - liblzma-dev
install:
  - "python setup.py install"
before_script:
  - "cd test"
script:
  - "python test_lzma.py"

Test on PyPy's Python 2 and Python 3 implementations
Test on PyPy's Python 2 and Python 3 implementations

These are initially allowed failures as the test suite fails.

pypy2 v5.8.0 breaks only one test method:

======================================================================
ERROR: test_bad_args (__main__.CompressDecompressFunctionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_lzma.py", line 273, in test_bad_args
    b"", format=lzma.FORMAT_RAW, filters={})
  File "/opt/python/pypy2.7-5.8.0/lib-python/2.7/unittest/case.py", line 473, in assertRaises
    callableObj(*args, **kwargs)
  File "/home/travis/virtualenv/pypy2.7-5.8.0/site-packages/backports/lzma/__init__.py", line 463, in decompress
    decomp = LZMADecompressor(format, memlimit, filters)
LZMAError: Internal error
----------------------------------------------------------------------

pypy3 v5.10.0 breaks with:

$ python test_lzma.py
Traceback (most recent call last):
  File "test_lzma.py", line 35, in <module>
    from backports import lzma
  File "/home/travis/virtualenv/pypy3.5-5.8.0/site-packages/backports/lzma/__init__.py", line 25, in <module>
    from ._lzma import *
ImportError: /home/travis/virtualenv/pypy3.5-5.8.0/site-packages/backports/lzma/_lzma.pypy3-58-x86_64-linux-gnu.so: undefined symbol: PyUnicode_DecodeUTF8Stateful
