def test_server_amubox(): tmp_path = make_tmp_dir() name = op.join(tmp_path, "data_test_macaque.zip") code = "RDxdxzmX89xcABG" server = "https://amubox.univ-amu.fr" add = "{}/public.php?service=files&t={}&download".format(server, code) cmd = "wget --no-check-certificate \"{}\" -O {}".format(add, name) os.system(cmd)
def test_load_test_data_zenodo(): tmp_path = make_tmp_dir() name = "Juna_Chimp" data_path = load_test_data(name=name, path_to=tmp_path) print(data_path) assert os.path.exists(data_path) assert len(os.listdir(data_path)) shutil.rmtree(data_path)
import os.path as op from macapype.utils.utils_tests import make_tmp_dir from macapype.utils.misc import parse_key from macapype.pipelines.prepare import (create_short_preparation_pipe, create_long_single_preparation_pipe, create_long_multi_preparation_pipe) data_path = make_tmp_dir() def test_create_short_auto_preparation_pipe(): params = {"short_preparation_pipe": {"bet_crop": {}}} # running workflow segment_pnh = create_short_preparation_pipe( params=parse_key(params, "short_preparation_pipe"), name="short_auto_preparation_pipe") segment_pnh.base_dir = data_path segment_pnh.write_graph(graph2use="colored") assert op.exists( op.join(data_path, "short_auto_preparation_pipe", "graph.png")) def test_create_short_auto_reorient_preparation_pipe(): params = { "short_preparation_pipe": {