Skip to content

Commit

Permalink
trying to cover another part. this refs #294
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBilheux committed Mar 2, 2024
1 parent 813571a commit 938cdbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/imars3d/backend/dataio/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ def __call__(self, **params):
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!")

Check warning on line 195 in src/imars3d/backend/dataio/data.py

View check run for this annotation

Codecov / codecov/patch

src/imars3d/backend/dataio/data.py#L194-L195

Added lines #L194 - L195 were not covered by tests

elif sigs.intersection(ref) == {"files"}:
logger.debug("Load by file list")
Expand Down
1 change: 1 addition & 0 deletions tests/unit/backend/dataio/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 938cdbc

Please sign in to comment.