diff options
Diffstat (limited to 'tests/test_file_utils.py')
-rw-r--r-- | tests/test_file_utils.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_file_utils.py b/tests/test_file_utils.py new file mode 100644 index 0000000..dd31188 --- /dev/null +++ b/tests/test_file_utils.py @@ -0,0 +1,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' + |