← Về thư mục
tests/hugging-science/test_scripts.py
- ParserTests · class · L65-L135 — class ParserTests(unittest.TestCase)
- setUp · method · L66-L67 — def setUp(self) -> None
- test_every_entry_is_found · method · L69-L78 — def test_every_entry_is_found(self) -> None
- test_the_count_suffix_is_stripped_from_the_section_label · method · L80-L85 — def test_the_count_suffix_is_stripped_from_the_section_label(self) -> None: # "## Datasets (2)" must land in the same bucket as "## Datasets".
- test_metadata_bullets_populate_the_record · method · L87-L93 — def test_metadata_bullets_populate_the_record(self) -> None
- test_huggingface_link_and_url_keys_all_fill_the_url · method · L95-L98 — def test_huggingface_link_and_url_keys_all_fill_the_url(self) -> None
- test_prose_after_the_bullets_becomes_the_description · method · L100-L104 — def test_prose_after_the_bullets_becomes_the_description(self) -> None
- test_an_entry_without_prose_has_an_empty_description · method · L106-L107 — def test_an_entry_without_prose_has_an_empty_description(self) -> None
- test_content_before_the_first_entry_is_ignored · method · L109-L114 — def test_content_before_the_first_entry_is_ignored(self) -> None
- test_an_entry_before_any_section_is_labelled_unknown · method · L116-L118 — def test_an_entry_before_any_section_is_labelled_unknown(self) -> None
- test_unrecognised_bullet_keys_are_dropped_not_misfiled · method · L120-L125 — def test_unrecognised_bullet_keys_are_dropped_not_misfiled(self) -> None
- test_empty_input_yields_no_entries · method · L127-L129 — def test_empty_input_yields_no_entries(self) -> None
- test_tags_are_split_and_blank_entries_discarded · method · L131-L135 — def test_tags_are_split_and_blank_entries_discarded(self) -> None
- FilterTests · class · L138-L188 — class FilterTests(unittest.TestCase)
- setUp · method · L139-L140 — def setUp(self) -> None
- test_no_filter_matches_everything · method · L142-L143 — def test_no_filter_matches_everything(self) -> None
- test_each_cli_filter_value_selects_its_section · method · L145-L150 — def test_each_cli_filter_value_selects_its_section(self) -> None
- test_the_aliases_absorb_singular_section_headings_upstream · method · L152-L160 — def test_the_aliases_absorb_singular_section_headings_upstream(self) -> None: # The alias sets map one CLI value onto the section spellings the # source markdown may use, so
--filter datasets still works when a # topic file writes ## Dataset.
- test_the_cli_only_offers_the_aliased_filter_values · method · L162-L166 — def test_the_cli_only_offers_the_aliased_filter_values(self) -> None: # matches_filter falls back to an exact section match for anything that # is not an alias key, so the CLI must not offer values outside them.
- test_kind_matching_is_case_insensitive · method · L168-L170 — def test_kind_matching_is_case_insensitive(self) -> None
- test_tag_matching_is_a_case_insensitive_substring · method · L172-L174 — def test_tag_matching_is_a_case_insensitive_substring(self) -> None
- test_a_tag_also_matches_the_type_field · method · L176-L180 — def test_a_tag_also_matches_the_type_field(self) -> None: #
matches_filter falls back to type so --tag model still works # on entries that carry no explicit tags.
- test_kind_and_tag_must_both_match · method · L182-L184 — def test_kind_and_tag_must_both_match(self) -> None
- test_an_unknown_kind_matches_nothing_rather_than_everything · method · L186-L188 — def test_an_unknown_kind_matches_nothing_rather_than_everything(self) -> None
- RenderTests · class · L191-L226 — class RenderTests(unittest.TestCase)
- setUp · method · L192-L193 — def setUp(self) -> None
- test_an_entry_renders_only_the_fields_it_has · method · L195-L201 — def test_an_entry_renders_only_the_fields_it_has(self) -> None
- test_grouped_rendering_counts_each_section · method · L203-L207 — def test_grouped_rendering_counts_each_section(self) -> None
- test_ungrouped_rendering_omits_section_headers · method · L209-L212 — def test_ungrouped_rendering_omits_section_headers(self) -> None
- test_an_empty_result_says_so_rather_than_rendering_nothing · method · L214-L215 — def test_an_empty_result_says_so_rather_than_rendering_nothing(self) -> None
- test_a_rendered_catalogue_round_trips_through_the_parser · method · L217-L226 — def test_a_rendered_catalogue_round_trips_through_the_parser(self) -> None: # render_entries emits the same H2/H3 shape the parser reads, so a # round trip must preserve every title and section.
- CatalogueSourceTests · class · L229-L263 — class CatalogueSourceTests(unittest.TestCase)
- test_topic_slugs_are_lowercase_hyphenated_and_sorted · method · L230-L236 — def test_topic_slugs_are_lowercase_hyphenated_and_sorted(self) -> None
- test_the_base_url_is_https · method · L238-L239 — def test_the_base_url_is_https(self) -> None
- test_requests_identify_the_skill_and_carry_a_timeout · method · L241-L249 — def test_requests_identify_the_skill_and_carry_a_timeout(self) -> None
- test_network_failures_exit_with_a_message_rather_than_a_traceback · method · L251-L263 — def test_network_failures_exit_with_a_message_rather_than_a_traceback(self) -> None