Skip to content
Snippets Groups Projects
Commit c7b2181a authored by Andi Gerken's avatar Andi Gerken
Browse files

Changed test for evaluation to include more cases.

parent 4f218cc4
No related merge requests found
Pipeline #41041 passed
...@@ -9,23 +9,25 @@ np.seterr(all="raise") ...@@ -9,23 +9,25 @@ np.seterr(all="raise")
logging.getLogger().setLevel(logging.INFO) logging.getLogger().setLevel(logging.INFO)
h5py_files = [utils.full_path(__file__, "../../resources/valid.hdf5")] h5py_file = utils.full_path(__file__, "../../resources/valid.hdf5")
graphics_out = utils.full_path(__file__, "output_graph.png")
if graphics_out.exists():
graphics_out.unlink()
def test_app_validate(): def test_app_validate(tmp_path):
""" This tests the function of the robofish-io-validate command """ """This tests the function of the robofish-io-validate command"""
class DummyArgs: class DummyArgs:
def __init__(self, analysis_type): def __init__(self, analysis_type, paths, save_path):
self.analysis_type = analysis_type self.paths = paths
self.paths = h5py_files
self.names = None self.names = None
self.save_path = graphics_out self.analysis_type = analysis_type
self.save_path = save_path
for mode in app.function_dict().keys(): for mode in app.function_dict().keys():
if mode != "all": if mode == "all":
app.evaluate(DummyArgs(mode)) app.evaluate(DummyArgs(mode, [h5py_file], tmp_path))
graphics_out.unlink() app.evaluate(DummyArgs(mode, [h5py_file, h5py_file], tmp_path))
else:
app.evaluate(DummyArgs(mode, [h5py_file], tmp_path / "image.png"))
app.evaluate(
DummyArgs(mode, [h5py_file, h5py_file], tmp_path / "image.png")
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment