def test_showprims_on_gmos_spect_default_mode(test_path): try: file_location = os.path.join(test_path, 'Gempy', GMOS_NS) answer = showprims(file_location) assert "RecipeNotFound Error" in answer except RecipeNotFound: pass
def test_showprims_on_gsaoi_flat_ql_mode(test_path): try: file_location = os.path.join(test_path, 'Gempy', GSAOI_FLAT) answer = showprims(file_location, 'ql') assert "ModuleNotFoundError" in answer except ModeError: pass
def test_showprims_on_gsaoi_dark_qa_mode(test_path): try: file_location = os.path.join(test_path, 'Gempy', GSAOI_DARK) answer = showprims(file_location, 'qa') assert "RecipeNotFound Error" in answer except RecipeNotFound: pass
def test_showprims_on_gsaoi_dark_qa_mode(): try: file_location = download_from_archive(GSAOI_DARK) answer = showprims(file_location, 'qa') assert "RecipeNotFound Error" in answer except RecipeNotFound: pass
def test_showprims_on_gnirs_spect(): try: file_location = download_from_archive(GNIRS_SPECT) answer = showprims(file_location, 'qa') assert "RecipeNotFound Error" in answer except RecipeNotFound: pass
def test_showprims_on_gnirs_spect(test_path): try: file_location = os.path.join(test_path, 'Gempy', GNIRS_SPECT) answer = showprims(file_location, 'qa') assert "RecipeNotFound Error" in answer except RecipeNotFound: pass
def test_showprims_on_gmos(test_path): file_location = os.path.join(test_path, 'Gempy', GMOS) answer = showprims(file_location) for i in range(len(gmos_answer)): assert gmos_answer[i] in answer
def test_showprims_on_gnirs(test_path): file_location = os.path.join(test_path, 'Gempy/', GNIRS) answer = showprims(file_location) for i in range(len(gnirs_answer)): assert gnirs_answer[i] in answer
def test_showprims_on_f2(test_path): file_location = os.path.join(test_path, 'Gempy', F2) answer = showprims(file_location) for i in range(len(f2_answer)): assert f2_answer[i] in answer
def test_showprims_on_niri(test_path): file_location = os.path.join(test_path, 'Gempy', NIRI) answer = showprims(file_location) for i in range(len(niri_answer)): assert niri_answer[i] in answer
def test_showprims_on_gsaoi_flat(test_path): file_location = os.path.join(test_path, 'Gempy', GSAOI_FLAT) answer = showprims(file_location) for i in range(len(gsaoi_flat_answer)): assert gsaoi_flat_answer[i] in answer
def test_showprims_on_gsaoi_image_qa_mode(test_path): file_location = os.path.join(test_path, 'Gempy', GSAOI_IMAGE) answer = showprims(file_location, 'qa', 'reduce_nostack') for i in range(len(gsaoi_image_answer_qa)): assert gsaoi_image_answer_qa[i] in answer
def test_showprims_on_gsaoi_image_sq_mode(test_path): file_location = os.path.join(test_path, 'Gempy', GSAOI_IMAGE) answer = showprims(file_location) for i in range(len(gsaoi_image_answer_sq)): assert gsaoi_image_answer_sq[i] in answer
def test_showprims_on_gsaoi_dark(test_path): file_location = os.path.join(test_path, 'Gempy', GSAOI_DARK) answer = showprims(file_location, 'sq', 'default') for i in range(len(gsaoi_dark_answer)): assert gsaoi_dark_answer[i] in answer
def test_showprims_on_gmos_spect(): file_location = download_from_archive(GMOS_SPECT) answer = showprims(file_location) assert "geminidr.gmos.recipes.ql.recipes_LS_SPECT::reduce" in answer
def test_showprims(name): filename, mode, recipe, expected = TESTS[name] file_location = download_from_archive(filename) answer = showprims(file_location, mode=mode, recipe=recipe) for line in expected: assert re.search(line, answer)