← Về thư mục
tests/ontology-term-resolution/test_scripts.py
- _load_script · function · L30-L39 — def _load_script(name: str)
- doc · function · L51-L62 — def doc(**overrides)
- CurieHelperTests · class · L65-L86 — class CurieHelperTests(unittest.TestCase)
- test_is_curie_accepts_real_prefixes · method · L66-L69 — def test_is_curie_accepts_real_prefixes(self)
- test_is_curie_rejects_non_curies · method · L71-L74 — def test_is_curie_rejects_non_curies(self)
- test_ontology_id_is_the_lowercased_prefix · method · L76-L79 — def test_ontology_id_is_the_lowercased_prefix(self)
- test_ontology_id_override_for_orphanet · method · L81-L83 — def test_ontology_id_override_for_orphanet(self)
- test_ontology_id_of_junk_is_none · method · L85-L86 — def test_ontology_id_of_junk_is_none(self)
- IriConversionTests · class · L89-L130 — class IriConversionTests(unittest.TestCase)
- test_obo_purl_to_curie · method · L90-L94 — def test_obo_purl_to_curie(self)
- test_efo_namespace_to_curie · method · L96-L100 — def test_efo_namespace_to_curie(self)
- test_orphanet_namespace_to_curie · method · L102-L106 — def test_orphanet_namespace_to_curie(self)
- test_multi_underscore_prefix_splits_on_the_last_underscore · method · L108-L112 — def test_multi_underscore_prefix_splits_on_the_last_underscore(self)
- test_unconvertible_iris_return_none · method · L114-L116 — def test_unconvertible_iris_return_none(self)
- test_candidate_iris_use_the_right_template · method · L118-L130 — def test_candidate_iris_use_the_right_template(self)
- LabelMatchingTests · class · L133-L157 — class LabelMatchingTests(unittest.TestCase)
- test_normalize_folds_case_and_whitespace_only · method · L134-L139 — def test_normalize_folds_case_and_whitespace_only(self)
- test_synonyms_collected_from_every_field_spelling · method · L141-L147 — def test_synonyms_collected_from_every_field_spelling(self)
- test_match_type_distinguishes_label_synonym_and_partial · method · L149-L157 — def test_match_type_distinguishes_label_synonym_and_partial(self)
- CandidateRankingTests · class · L160-L191 — class CandidateRankingTests(unittest.TestCase)
- test_dedupe_keeps_the_defining_ontologys_copy · method · L161-L168 — def test_dedupe_keeps_the_defining_ontologys_copy(self)
- test_dedupe_skips_docs_without_an_identifier · method · L170-L171 — def test_dedupe_skips_docs_without_an_identifier(self)
- test_exact_matches_outrank_partial_ones · method · L173-L182 — def test_exact_matches_outrank_partial_ones(self)
- test_label_match_outranks_synonym_match · method · L184-L191 — def test_label_match_outranks_synonym_match(self)
- ResolveStrategyTests · class · L194-L241 — class ResolveStrategyTests(unittest.TestCase)
- test_ladder_stops_at_the_first_strategy_that_hits · method · L195-L207 — def test_ladder_stops_at_the_first_strategy_that_hits(self)
- fake_search · function · L198-L200 — def fake_search(text, **kwargs)
- test_ladder_escalates_when_exact_finds_nothing · method · L209-L221 — def test_ladder_escalates_when_exact_finds_nothing(self)
- fake_search · function · L212-L214 — def fake_search(text, **kwargs)
- test_exact_only_never_escalates · method · L223-L235 — def test_exact_only_never_escalates(self)
- fake_search · function · L226-L228 — def fake_search(text, **kwargs)
- test_unresolved_query_becomes_a_visible_row · method · L237-L241 — def test_unresolved_query_becomes_a_visible_row(self)
- ValidateTermTests · class · L244-L346 — class ValidateTermTests(unittest.TestCase)
- check · method · L245-L251 — def check(self, term, curie="UBERON:0002107", label=None, branch=None, ontologies=None, ancestors=())
- live_term · method · L253-L265 — def live_term(self, **overrides)
- test_valid_term_passes · method · L267-L270 — def test_valid_term_passes(self)
- test_malformed_curie_is_rejected_without_a_lookup · method · L272-L278 — def test_malformed_curie_is_rejected_without_a_lookup(self)
- test_missing_term_is_not_found · method · L280-L281 — def test_missing_term_is_not_found(self)
- test_obsolete_term_reports_its_replacement_as_a_curie · method · L283-L293 — def test_obsolete_term_reports_its_replacement_as_a_curie(self)
- test_obsolete_without_replacement_says_so · method · L295-L299 — def test_obsolete_without_replacement_says_so(self)
- test_label_mismatch_reports_both_labels · method · L301-L305 — def test_label_mismatch_reports_both_labels(self)
- test_label_comparison_is_case_insensitive · method · L307-L308 — def test_label_comparison_is_case_insensitive(self)
- test_synonym_label_warns_and_names_the_primary_label · method · L310-L313 — def test_synonym_label_warns_and_names_the_primary_label(self)
- test_wrong_ontology_is_caught · method · L315-L318 — def test_wrong_ontology_is_caught(self)
- test_branch_membership_passes_and_fails · method · L320-L325 — def test_branch_membership_passes_and_fails(self)
- test_a_term_is_in_its_own_branch · method · L327-L329 — def test_a_term_is_in_its_own_branch(self)
- test_imported_only_term_warns · method · L331-L336 — def test_imported_only_term_warns(self)
- test_non_class_terms_warn · method · L338-L340 — def test_non_class_terms_warn(self)
- test_failure_beats_warning · method · L342-L346 — def test_failure_beats_warning(self)
- InputParsingTests · class · L349-L396 — class InputParsingTests(unittest.TestCase)
- parse · method · L350-L357 — def parse(self, text, terms=())
- test_tsv_with_headers · method · L359-L361 — def test_tsv_with_headers(self)
- test_alternate_header_names · method · L363-L365 — def test_alternate_header_names(self)
- test_csv_is_detected · method · L367-L369 — def test_csv_is_detected(self)
- test_headerless_two_columns · method · L371-L373 — def test_headerless_two_columns(self)
- test_single_column_has_no_labels · method · L375-L377 — def test_single_column_has_no_labels(self)
- test_id_only_header_without_label_column · method · L379-L381 — def test_id_only_header_without_label_column(self)
- test_comment_and_blank_lines_are_skipped · method · L383-L385 — def test_comment_and_blank_lines_are_skipped(self)
- test_positional_terms_merge_with_file_terms · method · L387-L389 — def test_positional_terms_merge_with_file_terms(self)
- test_resolve_deduplicates_queries_preserving_order · method · L391-L396 — def test_resolve_deduplicates_queries_preserving_order(self)
- ExitCodeTests · class · L399-L445 — class ExitCodeTests(unittest.TestCase)
- run_validate · method · L400-L404 — def run_validate(self, argv, results)
- result · method · L406-L408 — def result(self, status)
- test_clean_run_exits_zero · method · L410-L412 — def test_clean_run_exits_zero(self)
- test_failure_exits_one · method · L414-L416 — def test_failure_exits_one(self)
- test_warning_alone_exits_zero · method · L418-L420 — def test_warning_alone_exits_zero(self)
- test_strict_makes_warnings_fail · method · L422-L426 — def test_strict_makes_warnings_fail(self)
- test_no_input_exits_two · method · L428-L430 — def test_no_input_exits_two(self)
- test_bad_branch_curie_exits_two · method · L432-L435 — def test_bad_branch_curie_exits_two(self)
- test_tsv_output_has_the_documented_columns · method · L437-L439 — def test_tsv_output_has_the_documented_columns(self)
- test_json_output_is_a_list_of_records · method · L441-L445 — def test_json_output_is_a_list_of_records(self)
- PrefixHelperTests · class · L491-L601 — class PrefixHelperTests(unittest.TestCase)
- test_split_query_handles_prefix_and_curie · method · L492-L495 — def test_split_query_handles_prefix_and_curie(self)
- test_local_pattern_is_the_local_id_only · method · L497-L507 — def test_local_pattern_is_the_local_id_only(self)
- test_uri_format_and_ontobee_url · method · L509-L514 — def test_uri_format_and_ontobee_url(self)
- test_identifiers_resolver_url_keeps_the_colon · method · L516-L519 — def test_identifiers_resolver_url_keeps_the_colon(self)
- test_preferred_prefix_is_ok_in_either_case · method · L521-L525 — def test_preferred_prefix_is_ok_in_either_case(self)
- test_synonym_prefix_is_flagged · method · L527-L530 — def test_synonym_prefix_is_flagged(self)
- test_synonym_curie_still_builds_the_preferred_form · method · L532-L536 — def test_synonym_curie_still_builds_the_preferred_form(self)
- test_invalid_local_id_is_caught_without_a_network_call · method · L538-L541 — def test_invalid_local_id_is_caught_without_a_network_call(self)
- test_unknown_prefix · method · L543-L545 — def test_unknown_prefix(self)
- test_reference_detail_overrides_for_invalid_local · method · L547-L555 — def test_reference_detail_overrides_for_invalid_local(self)
- test_classify_does_not_template_landing_pages · method · L557-L563 — def test_classify_does_not_template_landing_pages(self)
- test_landing_pages_hp_uses_miriam_and_ontobee_mapping · method · L565-L572 — def test_landing_pages_hp_uses_miriam_and_ontobee_mapping(self)
- test_landing_pages_chebi_keeps_embedded_prefix · method · L574-L582 — def test_landing_pages_chebi_keeps_embedded_prefix(self)
- test_landing_pages_orphanet_uses_miriam_namespace_not_preferred · method · L584-L592 — def test_landing_pages_orphanet_uses_miriam_namespace_not_preferred(self)
- test_landing_pages_oba_has_no_identifiers_org · method · L594-L601 — def test_landing_pages_oba_has_no_identifiers_org(self)
- LookupPrefixCliTests · class · L604-L701 — class LookupPrefixCliTests(unittest.TestCase)
- test_malformed_input_does_not_hit_the_network · method · L605-L609 — def test_malformed_input_does_not_hit_the_network(self)
- test_lookup_uses_bioregistry_then_identifiers · method · L611-L628 — def test_lookup_uses_bioregistry_then_identifiers(self)
- test_lookup_orphanet_emits_miriam_url_not_preferred_prefix · method · L630-L645 — def test_lookup_orphanet_emits_miriam_url_not_preferred_prefix(self)
- test_lookup_oba_leaves_identifiers_org_empty · method · L647-L654 — def test_lookup_oba_leaves_identifiers_org_empty(self)
- test_lookup_chebi_keeps_embedded_prefix_in_miriam_url · method · L656-L670 — def test_lookup_chebi_keeps_embedded_prefix_in_miriam_url(self)
- test_lookup_blanks_identifiers_org_when_resolver_rejects · method · L672-L686 — def test_lookup_blanks_identifiers_org_when_resolver_rejects(self)
- test_unknown_prefix_from_404 · method · L688-L695 — def test_unknown_prefix_from_404(self)
- test_no_input_exits_two · method · L697-L701 — def test_no_input_exits_two(self): # pytest captures stdin, so isatty() is False unless we force a TTY.
- ZoomaHelperTests · class · L704-L735 — class ZoomaHelperTests(unittest.TestCase)
- test_filter_requires_an_ontology · method · L705-L711 — def test_filter_requires_an_ontology(self)
- test_flatten_hit_converts_obo_iris_and_flags_weak_confidence · method · L713-L726 — def test_flatten_hit_converts_obo_iris_and_flags_weak_confidence(self)
- test_high_confidence_is_safe · method · L728-L735 — def test_high_confidence_is_safe(self)
- MapTermsTests · class · L738-L772 — class MapTermsTests(unittest.TestCase)
- test_safe_only_drops_weak_hits · method · L739-L758 — def test_safe_only_drops_weak_hits(self)
- test_unresolved_row_has_no_curie · method · L760-L763 — def test_unresolved_row_has_no_curie(self)
- test_missing_ontology_exits_two · method · L765-L767 — def test_missing_ontology_exits_two(self)
- test_no_input_exits_two · method · L769-L772 — def test_no_input_exits_two(self)
- LiveApiTests · class · L776-L810 — class LiveApiTests(unittest.TestCase)
- test_exact_true_alone_is_not_exact_label_matching · method · L779-L783 — def test_exact_true_alone_is_not_exact_label_matching(self)
- test_obsolete_term_carries_its_replacement · method · L785-L790 — def test_obsolete_term_carries_its_replacement(self)
- test_search_cannot_report_obsolescence · method · L792-L798 — def test_search_cannot_report_obsolescence(self)
- test_iri_fallback_resolves_a_term_missing_from_the_obo_id_index · method · L800-L803 — def test_iri_fallback_resolves_a_term_missing_from_the_obo_id_index(self)
- test_orphanet_override_resolves · method · L805-L807 — def test_orphanet_override_resolves(self)
- test_unknown_id_resolves_to_nothing · method · L809-L810 — def test_unknown_id_resolves_to_nothing(self)