From de7c61873574690d596434a5106e13d74ff12213 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Thu, 20 Jun 2024 23:04:04 -0400 Subject: added test for infer_compression --- tests/test_file_utils.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/test_file_utils.py (limited to 'tests') 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' + -- cgit v1.2.3