import pytest from qolab.file_utils import infer_compression def test_infer_compression(): assert infer_compression('data.dat') is None assert infer_compression('data.unknown_ext') is None assert infer_compression('data.dat.gz') == 'gzip' assert infer_compression('data.dat.bz') == 'bzip' assert infer_compression('data.dat.bz2') == 'bzip'