diff --git a/tests/conftest.py b/tests/conftest.py index aa2d6ac..50f49b8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -19,7 +19,6 @@ def blat_for_tests(dat): blat_url = f"https://genome.ucsc.edu/cgi-bin/hgBlat?userSeq={seq}&type={type_}&db={database}&output=json" response = requests.get(blat_url) blat_output = response.json() - print(blat_output) hsp = blat_output["blat"][0] if "fix" in hsp[13]: hsp = blat_output["blat"][1] @@ -70,7 +69,7 @@ def full_mapping(request): scores_path = f"{data_file_path}scores-{(request.param)[11:]}" scores_csv = open(scores_path) with open(scoreset_path) as scoreset: - mave_dat,scores = metadata_obtain(scoreset,scores_csv) + mave_dat, scores = metadata_obtain(scoreset, scores_csv) mave_blat = blat_for_tests(mave_dat) mappings_dict = main(mave_blat, mave_dat) vrs_mapped = vrs_mapping(mave_dat, mappings_dict, mave_blat, scores) @@ -83,7 +82,7 @@ def obtain_transcripts(request): scores_path = f"{data_file_path}scores-{(request.param)[11:]}" scores_csv = open(scores_path) with open(scoreset_path) as scoreset: - mave_dat,scores = metadata_obtain(scoreset,scores_csv) + mave_dat, scores = metadata_obtain(scoreset, scores_csv) mave_blat = blat_for_tests(mave_dat) mappings_dict = main(mave_blat, mave_dat) return mappings_dict diff --git a/tests/test_for_invalid_inputs.py b/tests/test_for_invalid_inputs.py index 54910d1..81f6f46 100644 --- a/tests/test_for_invalid_inputs.py +++ b/tests/test_for_invalid_inputs.py @@ -14,16 +14,18 @@ def test_for_scoreset_if_blat_successful(self): The mapping raises an Exception""" scoreset = open(f"{data_file_path}urn:mavedb:00000010-a-1", "r") + scores_csv = open(f"{data_file_path}scores-00000010-a-1") with pytest.raises(Exception): - main_map(scoreset) + main_map(scoreset, scores_csv) def test_for_scoreset_if_blat_not_successful(self): """Test to check for non human scoreset where BLAT Alignment is not successful, and gives no output. The mapping raises a ValueError""" scoreset = open(f"{data_file_path}urn:mavedb:00000004-a-1", "r") + scores_csv = open(f"{data_file_path}scores-00000004-a-1") with pytest.raises(ValueError): - main_map(scoreset) + main_map(scoreset, scores_csv) class TestForUnsuccessfulMappingScoresets: @@ -34,5 +36,6 @@ def test_for_no_transcripts_found(self): """Testing for a scoreset for which transcripts could not be found""" # TODO: create test for 53 scoreset = open(f"{data_file_path}urn:mavedb:00000097-c-1", "r") + scores_csv = open(f"{data_file_path}scores-00000097-c-1") with pytest.raises(Exception): - main_map(scoreset) + main_map(scoreset, scores_csv)