def test_get_age(ophys_lims_experiment_id, compare_val): ophys_lims_api = OphysLimsExtractor(ophys_lims_experiment_id) if compare_val is None: expected_fail = False try: ophys_lims_api.get_age() except OneResultExpectedError: expected_fail = True assert expected_fail is True else: assert ophys_lims_api.get_age() == compare_val
def test_get_maxint_file(ophys_experiment_id, api_data): ophys_lims_api = OphysLimsExtractor(ophys_experiment_id) f = ophys_lims_api.get_max_projection_file key = 'maxint_file' if ophys_experiment_id in api_data: assert f() == api_data[ophys_experiment_id][key] else: expected_fail(f)
def test_get_ophys_experiment_dir(ophys_experiment_id, api_data): ophys_lims_api = OphysLimsExtractor(ophys_experiment_id) f = ophys_lims_api.get_ophys_experiment_dir key = 'ophys_dir' if ophys_experiment_id in api_data: assert f() == os.path.normpath(api_data[ophys_experiment_id][key]) else: expected_fail(f)
def test_get_full_genotype(ophys_experiment_id, api_data): ophys_lims_api = OphysLimsExtractor(ophys_experiment_id) f = ophys_lims_api.get_full_genotype key = 'full_genotype' if ophys_experiment_id in api_data: assert f() == api_data[ophys_experiment_id][key] else: expected_fail(f)
def test_get_workflow_state(ophys_experiment_id, api_data): ophys_lims_api = OphysLimsExtractor(ophys_experiment_id) f = ophys_lims_api.get_workflow_state key = 'workflow_state' if ophys_experiment_id in api_data: assert f() == api_data[ophys_experiment_id][key] else: expected_fail(f)
def test_get_reporter_line(ophys_experiment_id, api_data): ophys_lims_api = OphysLimsExtractor(ophys_experiment_id) f = ophys_lims_api.get_reporter_line key = 'reporter_line' if ophys_experiment_id in api_data: assert f() == api_data[ophys_experiment_id][key] else: expected_fail(f)
def test_get_mouse_ID(ophys_experiment_id, api_data): ophys_lims_api = OphysLimsExtractor(ophys_experiment_id) f = ophys_lims_api.get_external_specimen_name key = 'mouse_id' if ophys_experiment_id in api_data: assert f() == api_data[ophys_experiment_id][key] else: expected_fail(f)
def test_get_stimulus_name(ophys_experiment_id, api_data): ophys_lims_api = OphysLimsExtractor(ophys_experiment_id) f = ophys_lims_api.get_stimulus_name key = 'stimulus_name' if ophys_experiment_id in api_data: assert f() == api_data[ophys_experiment_id][key] else: expected_fail(f)
def test_get_imaging_depth(ophys_experiment_id, api_data): ophys_lims_api = OphysLimsExtractor(ophys_experiment_id) f = ophys_lims_api.get_imaging_depth key = 'imaging_depth' if ophys_experiment_id in api_data: assert f() == api_data[ophys_experiment_id][key] else: expected_fail(f)
def test_get_targeted_structure(ophys_experiment_id, api_data): ophys_lims_api = OphysLimsExtractor(ophys_experiment_id) f = ophys_lims_api.get_targeted_structure key = 'targeted_structure' if ophys_experiment_id in api_data: assert f() == api_data[ophys_experiment_id][key] else: expected_fail(f)
def test_get_rigid_motion_transform_file(ophys_experiment_id, api_data): ophys_lims_api = OphysLimsExtractor(ophys_experiment_id) f = ophys_lims_api.get_rigid_motion_transform_file key = 'rigid_motion_transform_file' if ophys_experiment_id in api_data: assert f() == api_data[ophys_experiment_id][key] else: expected_fail(f)
def test_average_intensity_projection_image(ophys_experiment_id, api_data): ophys_lims_api = OphysLimsExtractor(ophys_experiment_id) f = ophys_lims_api.get_average_intensity_projection_image_file key = 'avgint_a1X_file' if ophys_experiment_id in api_data: assert f() == api_data[ophys_experiment_id][key] else: expected_fail(f)
def test_get_ophys_segmentation_run_id(ophys_experiment_id): ophys_lims_api = OphysLimsExtractor(ophys_experiment_id) _ = ophys_lims_api.get_ophys_cell_segmentation_run_id()