Skip to content

python 2.7: test_lz4_compression_without_IO LZ4_NOT_INSTALLED_ERROR #739

@costrouc

Description

@costrouc

With python version 2.7 the LZ4_NOT_INSTALLED_ERROR is wrong when running the tests and lz4 is not present.

Installing python-lz4 fixes the issue since that function is not run if lz4 is present.

py.test joblib
=================================== FAILURES ===================================
_______________________ test_lz4_compression_without_lz4 _______________________

tmpdir = local('/tmp/nix-build-python2.7-joblib-0.12.2.drv-0/pytest-of-costrouc/pytest-0/test_lz4_compression_without_l0')

    @without_lz4
    def test_lz4_compression_without_lz4(tmpdir):
        # Check that lz4 cannot be used when dependency is not available.
        fname = tmpdir.join('test.nolz4').strpath
        data = 'test data'
        with raises(ValueError) as excinfo:
            numpy_pickle.dump(data, fname, compress='lz4')
        excinfo.match(LZ4_NOT_INSTALLED_ERROR)
    
        with raises(ValueError) as excinfo:
            numpy_pickle.dump(data, fname + '.lz4')
>       excinfo.match(LZ4_NOT_INSTALLED_ERROR)
E       AssertionError: Pattern 'LZ4 is not installed. Install it with pip: http://python-lz4.readthedocs.io/' not found in 'lz4 compression is only available with python3+.'

joblib/test/test_numpy_pickle.py:1064: AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions