Commit 938cdbc5 authored by Bilheux, Jean-Christophe's avatar Bilheux, Jean-Christophe
Browse files

trying to cover another part. this refs #294

parent 813571af
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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")
+1 −0
Original line number Diff line number Diff line
@@ -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)