diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-06-20 23:04:04 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-06-20 23:04:04 -0400 |
commit | de7c61873574690d596434a5106e13d74ff12213 (patch) | |
tree | 4d92496cb4b81f444b9c8e6a6af97c33a10cc4fc | |
parent | 894638a9d6285f19cee42281880c8decce41c11b (diff) | |
download | qolab-de7c61873574690d596434a5106e13d74ff12213.tar.gz qolab-de7c61873574690d596434a5106e13d74ff12213.zip |
added test for infer_compression
-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' + |