Loading src/imars3d/backend/dataio/data.py +3 −3 Original line number Diff line number Diff line Loading @@ -190,9 +190,9 @@ class load_data(param.ParameterizedFunction): tqdm_class=params.tqdm_class, ) elif sigs.intersection(ref) == {"files", "dir"}: logger.error("Other cases of files and dir cannot be used at the same time") raise ValueError("Mix signatures not allowed") elif ("ct_files" in params.keys()) and ("ob_dir" in params.keys()): logger.error("ct_files and ob_dir mixed not allowed!") raise ValueError("Mix signatures (ct_files, ob_dir) not allowed!") elif sigs.intersection(ref) == {"files"}: logger.debug("Load by file list") Loading tests/unit/backend/dataio/test_data.py +1 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ def test_load_data( with pytest.raises(ValueError): load_data(ct_files=1, ob_files=[], dc_files=[]) load_data(ct_dir=1, ob_files=[]) load_data(ct_files=1, ob_dir="/tmp") load_data(ct_files=[], ob_files=[], dc_files=[], ct_fnmatch=1) load_data(ct_files=[], ob_files=[], dc_files=[], ob_fnmatch=1) load_data(ct_files=[], ob_files=[], dc_files=[], dc_fnmatch=1) Loading Loading
src/imars3d/backend/dataio/data.py +3 −3 Original line number Diff line number Diff line Loading @@ -190,9 +190,9 @@ class load_data(param.ParameterizedFunction): tqdm_class=params.tqdm_class, ) elif sigs.intersection(ref) == {"files", "dir"}: logger.error("Other cases of files and dir cannot be used at the same time") raise ValueError("Mix signatures not allowed") elif ("ct_files" in params.keys()) and ("ob_dir" in params.keys()): logger.error("ct_files and ob_dir mixed not allowed!") raise ValueError("Mix signatures (ct_files, ob_dir) not allowed!") elif sigs.intersection(ref) == {"files"}: logger.debug("Load by file list") Loading
tests/unit/backend/dataio/test_data.py +1 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ def test_load_data( with pytest.raises(ValueError): load_data(ct_files=1, ob_files=[], dc_files=[]) load_data(ct_dir=1, ob_files=[]) load_data(ct_files=1, ob_dir="/tmp") load_data(ct_files=[], ob_files=[], dc_files=[], ct_fnmatch=1) load_data(ct_files=[], ob_files=[], dc_files=[], ob_fnmatch=1) load_data(ct_files=[], ob_files=[], dc_files=[], dc_fnmatch=1) Loading