blob: dd31188e42aa47a04f4c0a28d099304f0a997d85 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
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'
|