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 branches found
No related tags found
No related merge requests found
Checking pipeline status
......@@ -9,23 +9,25 @@ np.seterr(all="raise")
logging.getLogger().setLevel(logging.INFO)
h5py_files = [utils.full_path(__file__, "../../resources/valid.hdf5")]
graphics_out = utils.full_path(__file__, "output_graph.png")
if graphics_out.exists():
graphics_out.unlink()
h5py_file = utils.full_path(__file__, "../../resources/valid.hdf5")
def test_app_validate():
""" This tests the function of the robofish-io-validate command """
def test_app_validate(tmp_path):
"""This tests the function of the robofish-io-validate command"""
class DummyArgs:
def __init__(self, analysis_type):
self.analysis_type = analysis_type
self.paths = h5py_files
def __init__(self, analysis_type, paths, save_path):
self.paths = paths
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():
if mode != "all":
app.evaluate(DummyArgs(mode))
graphics_out.unlink()
if mode == "all":
app.evaluate(DummyArgs(mode, [h5py_file], tmp_path))
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