← Về thư mục
tests/paper-lookup/test_scripts.py
- run_script · function · L50-L57 — def run_script(name: str, *args: str) -> subprocess.CompletedProcess
- fixture · function · L60-L61 — def fixture(name: str) -> str
- CommonTests · class · L64-L88 — class CommonTests(unittest.TestCase)
- test_collapse_ws_flattens_arxiv_hard_wrapping · method · L65-L69 — def test_collapse_ws_flattens_arxiv_hard_wrapping(self) -> None
- test_collapse_ws_handles_none · method · L71-L72 — def test_collapse_ws_handles_none(self) -> None
- test_strip_control_keeps_tab_and_newline · method · L74-L75 — def test_strip_control_keeps_tab_and_newline(self) -> None
- test_read_input_rejects_oversized_file · method · L77-L79 — def test_read_input_rejects_oversized_file(self) -> None
- test_read_input_rejects_missing_file · method · L81-L83 — def test_read_input_rejects_missing_file(self) -> None
- test_load_json_attributes_the_parse_failure_to_the_source · method · L85-L88 — def test_load_json_attributes_the_parse_failure_to_the_source(self) -> None
- ReconciliationTests · class · L91-L123 — class ReconciliationTests(unittest.TestCase)
- test_complete_walk · method · L99-L103 — def test_complete_walk(self) -> None
- test_bound_is_explained_not_a_failure · method · L105-L113 — def test_bound_is_explained_not_a_failure(self) -> None
- test_unexplained_shortfall_is_not_ok · method · L115-L118 — def test_unexplained_shortfall_is_not_ok(self) -> None
- test_absent_total_is_a_documented_state · method · L120-L123 — def test_absent_total_is_a_documented_state(self) -> None
- RedactionTests · class · L126-L174 — class RedactionTests(unittest.TestCase)
- test_api_key_value_is_replaced_but_the_parameter_survives · method · L133-L137 — def test_api_key_value_is_replaced_but_the_parameter_survives(self) -> None
- test_contact_details_are_redacted_too · method · L139-L143 — def test_contact_details_are_redacted_too(self) -> None
- test_redaction_is_case_insensitive_on_the_parameter_name · method · L145-L146 — def test_redaction_is_case_insensitive_on_the_parameter_name(self) -> None
- test_urls_without_a_query_are_untouched · method · L148-L150 — def test_urls_without_a_query_are_untouched(self) -> None
- test_dry_run_output_carries_no_key · method · L152-L174 — def test_dry_run_output_carries_no_key(self) -> None
- JatsTests · class · L177-L245 — class JatsTests(unittest.TestCase)
- test_full_text_article_yields_sections · method · L178-L186 — def test_full_text_article_yields_sections(self) -> None
- test_first_article_id_wins_over_nested_sub_article_doi · method · L188-L192 — def test_first_article_id_wins_over_nested_sub_article_doi(self) -> None
- test_missing_body_exits_2_and_surfaces_the_xml_comment · method · L194-L203 — def test_missing_body_exits_2_and_surfaces_the_xml_comment(self) -> None
- test_metadata_still_emitted_when_body_is_missing · method · L205-L208 — def test_metadata_still_emitted_when_body_is_missing(self) -> None
- test_allow_metadata_only_opts_out_of_the_refusal · method · L210-L213 — def test_allow_metadata_only_opts_out_of_the_refusal(self) -> None
- test_europepmc_bare_article_wrapper_is_accepted · method · L215-L219 — def test_europepmc_bare_article_wrapper_is_accepted(self) -> None
- test_section_filter_matches_case_insensitively · method · L221-L225 — def test_section_filter_matches_case_insensitively(self) -> None
- test_unmatched_section_filter_lists_what_is_available · method · L227-L230 — def test_unmatched_section_filter_lists_what_is_available(self) -> None
- test_non_jats_xml_is_rejected_with_a_useful_message · method · L232-L235 — def test_non_jats_xml_is_rejected_with_a_useful_message(self) -> None
- test_xref_text_is_dropped_but_the_sentence_survives · method · L237-L245 — def test_xref_text_is_dropped_but_the_sentence_survives(self) -> None
- ArxivTests · class · L248-L321 — class ArxivTests(unittest.TestCase)
- test_entry_is_parsed_with_version_split · method · L249-L256 — def test_entry_is_parsed_with_version_split(self) -> None
- test_pdf_link_is_selected_by_rel_not_position · method · L258-L264 — def test_pdf_link_is_selected_by_rel_not_position(self) -> None
- test_hard_wrapped_title_and_abstract_are_collapsed · method · L266-L270 — def test_hard_wrapped_title_and_abstract_are_collapsed(self) -> None
- test_absent_arxiv_doi_is_none_not_invented · method · L272-L275 — def test_absent_arxiv_doi_is_none_not_invented(self) -> None
- test_error_feed_exits_3 · method · L277-L281 — def test_error_feed_exits_3(self) -> None
- test_rate_limited_plain_text_body_exits_5 · method · L283-L288 — def test_rate_limited_plain_text_body_exits_5(self) -> None
- test_non_xml_body_reports_what_it_actually_got · method · L290-L293 — def test_non_xml_body_reports_what_it_actually_got(self) -> None
- test_empty_feed_is_reported_as_a_genuine_no_match · method · L295-L301 — def test_empty_feed_is_reported_as_a_genuine_no_match(self) -> None
- test_query_as_executed_is_reported · method · L303-L307 — def test_query_as_executed_is_reported(self) -> None
- test_ids_only_strips_versions · method · L309-L311 — def test_ids_only_strips_versions(self) -> None
- test_split_version_leaves_unversioned_ids_alone · method · L313-L317 — def test_split_version_leaves_unversioned_ids_alone(self) -> None
- test_id_from_url_is_scheme_agnostic · method · L319-L321 — def test_id_from_url_is_scheme_agnostic(self) -> None
- OpenAlexAbstractTests · class · L324-L379 — class OpenAlexAbstractTests(unittest.TestCase)
- test_abstract_is_reconstructed_in_position_order · method · L325-L330 — def test_abstract_is_reconstructed_in_position_order(self) -> None
- test_duplicate_positions_keep_both_tokens · method · L332-L338 — def test_duplicate_positions_keep_both_tokens(self) -> None
- test_gaps_in_the_index_are_reported · method · L340-L342 — def test_gaps_in_the_index_are_reported(self) -> None
- test_non_integer_positions_are_reported_not_crashed_on · method · L344-L347 — def test_non_integer_positions_are_reported_not_crashed_on(self) -> None
- test_empty_index_yields_empty_text · method · L349-L350 — def test_empty_index_yields_empty_text(self) -> None
- test_single_work_payload · method · L352-L358 — def test_single_work_payload(self) -> None
- test_list_response_payload · method · L360-L363 — def test_list_response_payload(self) -> None
- test_missing_index_distinguishes_no_abstract_from_select_exclusion · method · L365-L370 — def test_missing_index_distinguishes_no_abstract_from_select_exclusion(self) -> None
- test_text_only_fails_loudly_when_nothing_reconstructs · method · L372-L375 — def test_text_only_fails_loudly_when_nothing_reconstructs(self) -> None
- test_works_from_rejects_a_bare_scalar · method · L377-L379 — def test_works_from_rejects_a_bare_scalar(self) -> None
- PaginateAdapterTests · class · L382-L528 — class PaginateAdapterTests(unittest.TestCase)
- test_biorxiv_steps_by_the_reported_count_not_100 · method · L386-L394 — def test_biorxiv_steps_by_the_reported_count_not_100(self) -> None
- test_biorxiv_pubs_steps_by_100 · method · L396-L401 — def test_biorxiv_pubs_steps_by_100(self) -> None
- test_biorxiv_stops_when_the_next_offset_reaches_total · method · L403-L408 — def test_biorxiv_stops_when_the_next_offset_reaches_total(self) -> None
- test_biorxiv_reports_the_count_mismatch_it_falls_back_from · method · L410-L417 — def test_biorxiv_reports_the_count_mismatch_it_falls_back_from(self) -> None
- test_biorxiv_no_articles_found_is_surfaced · method · L419-L426 — def test_biorxiv_no_articles_found_is_surfaced(self) -> None
- test_biorxiv_endpoint_without_counts_reports_no_total · method · L428-L435 — def test_biorxiv_endpoint_without_counts_reports_no_total(self) -> None
- test_biorxiv_url_selects_details_or_pubs · method · L437-L440 — def test_biorxiv_url_selects_details_or_pubs(self) -> None
- test_medrxiv_never_uses_the_api_medrxiv_host · method · L442-L445 — def test_medrxiv_never_uses_the_api_medrxiv_host(self) -> None
- test_europepmc_stops_on_an_echoed_cursor · method · L447-L453 — def test_europepmc_stops_on_an_echoed_cursor(self) -> None
- test_europepmc_continues_on_a_new_cursor · method · L455-L459 — def test_europepmc_continues_on_a_new_cursor(self) -> None
- test_europepmc_errcode_in_a_200_body_raises · method · L461-L466 — def test_europepmc_errcode_in_a_200_body_raises(self) -> None
- test_europepmc_reports_the_query_as_parsed · method · L468-L478 — def test_europepmc_reports_the_query_as_parsed(self) -> None
- test_openalex_stops_on_an_empty_page · method · L480-L482 — def test_openalex_stops_on_an_empty_page(self) -> None
- test_openalex_surfaces_the_reported_cost · method · L484-L489 — def test_openalex_surfaces_the_reported_cost(self) -> None
- test_crossref_stops_on_an_empty_page · method · L491-L496 — def test_crossref_stops_on_an_empty_page(self) -> None
- test_every_api_declares_a_delay_and_a_query_format · method · L498-L502 — def test_every_api_declares_a_delay_and_a_query_format(self) -> None
- test_dry_run_makes_no_request · method · L504-L510 — def test_dry_run_makes_no_request(self) -> None
- test_list_apis_needs_no_other_argument · method · L512-L515 — def test_list_apis_needs_no_other_argument(self) -> None
- test_missing_required_arguments_exit_2 · method · L517-L520 — def test_missing_required_arguments_exit_2(self) -> None
- test_nonpositive_bounds_are_rejected · method · L522-L528 — def test_nonpositive_bounds_are_rejected(self) -> None
- StructureTests · class · L531-L582 — class StructureTests(unittest.TestCase)
- test_frontmatter_conforms · method · L534-L535 — def test_frontmatter_conforms(self) -> None
- test_skill_md_is_within_the_line_budget · method · L537-L538 — def test_skill_md_is_within_the_line_budget(self) -> None
- test_no_stray_tests_under_the_skill · method · L540-L541 — def test_no_stray_tests_under_the_skill(self) -> None
- test_no_bytecode_shipped · method · L543-L545 — def test_no_bytecode_shipped(self) -> None
- test_referenced_paths_exist · method · L547-L548 — def test_referenced_paths_exist(self) -> None
- test_scripts_compile · method · L550-L551 — def test_scripts_compile(self) -> None
- test_no_dynamic_execution · method · L553-L554 — def test_no_dynamic_execution(self) -> None
- test_no_leftover_tool_call_markup · method · L556-L562 — def test_no_leftover_tool_call_markup(self) -> None
- test_every_reference_file_is_linked_from_skill_md · method · L564-L568 — def test_every_reference_file_is_linked_from_skill_md(self) -> None
- test_every_script_is_documented_in_skill_md · method · L570-L576 — def test_every_script_is_documented_in_skill_md(self) -> None
- test_paginate_covers_every_api_it_advertises · method · L578-L582 — def test_paginate_covers_every_api_it_advertises(self) -> None