Skip to content

Commit 13c4a53

Browse files
committed
Cover more code paths in test
1 parent 43f3a1e commit 13c4a53

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/test_misc.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,15 @@ def _is_password_style(item):
115115
monkeypatch.setattr(imcflibs.imagej.misc, "_is_password_style", _is_password_style)
116116

117117
script_module = ScriptModule(
118-
["AAA", "BBB", "OMERO_PASSWD"],
119-
{"AAA": "aaa", "BBB": "bbb", "OMERO_PASSWD": "ultra-secret"},
118+
input_names=["AAA", "BBB", "OMERO_PASSWD", "SJLOG", "NOT_THERE"],
119+
inputs={"AAA": "aaa", "BBB": "bbb", "OMERO_PASSWD": "ultra-secret"},
120120
)
121121
script_globals = {"org.scijava.script.ScriptModule": script_module}
122122
save_script_parameters(script_globals, destination=base)
123+
assert "Skipping parameter from skip-list" in caplog.text
123124
assert "Skipping password-style parameter" in caplog.text
124-
assert "Saved 2 parameters (skipped 1 password" in caplog.text
125+
assert "Unable to fetch value for parameter: NOT_THERE" in caplog.text
126+
assert "Saved 2 parameters (skipped 1 password-style and 1 others)." in caplog.text
125127
assert "Saved 2 script parameters to" in caplog.text
126128

127129
with open(str(base) + "/script_parameters.txt", "r") as f:

0 commit comments

Comments
 (0)