← Về thư mục
scripts/test_contamination_signals.py
- PreprintSignalTest · class · L32-L146 — class PreprintSignalTest(unittest.TestCase)
- test_arxiv_2024_returns_true · method · L36-L37 — def test_arxiv_2024_returns_true(self) -> None
- test_arxiv_2023_returns_false · method · L39-L41 — def test_arxiv_2023_returns_false(self) -> None: # Year boundary: 2023 is below threshold
- test_arxiv_2025_returns_true · method · L43-L44 — def test_arxiv_2025_returns_true(self) -> None
- test_biorxiv_2024_returns_true · method · L46-L47 — def test_biorxiv_2024_returns_true(self) -> None
- test_medrxiv_2024_returns_true · method · L49-L50 — def test_medrxiv_2024_returns_true(self) -> None
- test_ssrn_2024_returns_true · method · L52-L53 — def test_ssrn_2024_returns_true(self) -> None
- test_research_square_2024_returns_true · method · L55-L58 — def test_research_square_2024_returns_true(self) -> None
- test_preprints_org_2024_returns_true · method · L60-L63 — def test_preprints_org_2024_returns_true(self) -> None
- test_chemrxiv_2024_returns_true · method · L65-L67 — def test_chemrxiv_2024_returns_true(self) -> None
- test_eartharxiv_2024_returns_true · method · L69-L72 — def test_eartharxiv_2024_returns_true(self) -> None
- test_osf_preprints_2024_returns_true · method · L74-L77 — def test_osf_preprints_2024_returns_true(self) -> None
- test_techrxiv_2024_returns_true · method · L79-L80 — def test_techrxiv_2024_returns_true(self) -> None
- test_non_preprint_venue_2024_returns_false · method · L82-L86 — def test_non_preprint_venue_2024_returns_false(self) -> None: # Year passes threshold but venue is not in the closed list
- test_missing_venue_returns_false · method · L88-L90 — def test_missing_venue_returns_false(self) -> None: # Defensive: entries lacking venue cannot satisfy the AND
- test_missing_year_returns_false · method · L92-L94 — def test_missing_year_returns_false(self) -> None: # Defensive: entries lacking year cannot satisfy the AND
- test_source_pointer_infers_arxiv · method · L96-L103 — def test_source_pointer_infers_arxiv(self) -> None
- test_source_pointer_infers_biorxiv · method · L105-L110 — def test_source_pointer_infers_biorxiv(self) -> None
- test_source_pointer_infers_osf_preprints · method · L112-L117 — def test_source_pointer_infers_osf_preprints(self) -> None
- test_source_pointer_non_preprint_returns_false · method · L119-L125 — def test_source_pointer_non_preprint_returns_false(self) -> None
- test_source_pointer_ignored_when_venue_present · method · L127-L138 — def test_source_pointer_ignored_when_venue_present(self) -> None
- test_source_pointer_pre_2024_returns_false · method · L140-L146 — def test_source_pointer_pre_2024_returns_false(self) -> None
- SemanticScholarSignalTest · class · L152-L211 — class SemanticScholarSignalTest(unittest.TestCase)
- _entry · method · L159-L168 — def _entry(self, **overrides)
- test_manual_entry_returns_none · method · L170-L179 — def test_manual_entry_returns_none(self) -> None
- test_ss_match_returns_false · method · L181-L184 — def test_ss_match_returns_false(self) -> None
- test_ss_no_match_returns_true · method · L186-L189 — def test_ss_no_match_returns_true(self) -> None
- test_ss_api_degradation_returns_none · method · L191-L197 — def test_ss_api_degradation_returns_none(self) -> None
- test_ss_network_failure_returns_none · method · L199-L202 — def test_ss_network_failure_returns_none(self) -> None
- test_unexpected_exception_propagates · method · L204-L211 — def test_unexpected_exception_propagates(self) -> None
- EmissionRulesTest · class · L217-L263 — class EmissionRulesTest(unittest.TestCase)
- _entry · method · L222-L228 — def _entry(self, **overrides)
- test_both_signals_computed_emits_full_object · method · L230-L237 — def test_both_signals_computed_emits_full_object(self) -> None
- test_clean_entry_emits_both_false · method · L239-L246 — def test_clean_entry_emits_both_false(self) -> None
- test_manual_entry_omits_unmatched_field · method · L248-L254 — def test_manual_entry_omits_unmatched_field(self) -> None
- test_api_degradation_omits_unmatched_field · method · L256-L263 — def test_api_degradation_omits_unmatched_field(self) -> None
- ResetClientOutageLatchHelperTest · class · L266-L280 — class ResetClientOutageLatchHelperTest(unittest.TestCase)
- test_helper_invokes_reset_when_present · method · L272-L275 — def test_helper_invokes_reset_when_present(self) -> None
- test_helper_no_ops_when_method_absent · method · L277-L280 — def test_helper_no_ops_when_method_absent(self) -> None
- ResolveOpenAlexUnmatchedTest · class · L292-L359 — class ResolveOpenAlexUnmatchedTest(unittest.TestCase)
- test_match · method · L295-L308 — def test_match(self)
- test_no_match · method · L310-L324 — def test_no_match(self)
- test_manual_exempt · method · L326-L335 — def test_manual_exempt(self)
- test_doi_absent_falls_through_to_title · method · L337-L347 — def test_doi_absent_falls_through_to_title(self)
- test_api_down_raises · method · L349-L359 — def test_api_down_raises(self)
- ResolveCrossrefUnmatchedTest · class · L367-L434 — class ResolveCrossrefUnmatchedTest(unittest.TestCase)
- test_match · method · L370-L383 — def test_match(self)
- test_no_match · method · L385-L399 — def test_no_match(self)
- test_manual_exempt · method · L401-L410 — def test_manual_exempt(self)
- test_doi_absent_falls_through_to_title · method · L412-L422 — def test_doi_absent_falls_through_to_title(self)
- test_api_down_raises · method · L424-L434 — def test_api_down_raises(self)
- ResolveArxivUnmatchedTest · class · L442-L533 — class ResolveArxivUnmatchedTest(unittest.TestCase)
- test_match · method · L449-L462 — def test_match(self)
- test_no_match · method · L464-L478 — def test_no_match(self)
- test_manual_exempt · method · L480-L489 — def test_manual_exempt(self)
- test_arxiv_id_absent_skips_resolver · method · L491-L508 — def test_arxiv_id_absent_skips_resolver(self)
- test_arxiv_id_miss_falls_through_to_title · method · L510-L521 — def test_arxiv_id_miss_falls_through_to_title(self)
- test_api_down_raises · method · L523-L533 — def test_api_down_raises(self)
- BuildSignalsArxivExtensionTest · class · L541-L604 — class BuildSignalsArxivExtensionTest(unittest.TestCase)
- _entry · method · L546-L548 — def _entry(self, **overrides)
- test_no_arxiv_client_omits_arxiv_field · method · L550-L555 — def test_no_arxiv_client_omits_arxiv_field(self) -> None
- test_arxiv_client_emits_arxiv_field · method · L557-L567 — def test_arxiv_client_emits_arxiv_field(self) -> None
- test_no_arxiv_id_omits_arxiv_field_even_with_client · method · L569-L582 — def test_no_arxiv_id_omits_arxiv_field_even_with_client(self) -> None
- test_manual_entry_omits_arxiv_field_even_with_client · method · L584-L593 — def test_manual_entry_omits_arxiv_field_even_with_client(self) -> None
- test_arxiv_api_down_omits_arxiv_field · method · L595-L604 — def test_arxiv_api_down_omits_arxiv_field(self) -> None
- _FakeCache · class · L612-L627 — class _FakeCache
- init · method · L616-L619 — def init(self, seed=None)
- get · method · L621-L623 — def get(self, citation_key, resolver_name, query_form)
- put · method · L625-L627 — def put(self, citation_key, resolver_name, query_form, response)
- ResolveCrossrefCacheTest · class · L630-L750 — class ResolveCrossrefCacheTest(unittest.TestCase)
- _entry · method · L634-L641 — def _entry(self, **overrides)
- test_cache_none_is_byte_equivalent · method · L643-L650 — def test_cache_none_is_byte_equivalent(self)
- test_cache_hit_skips_network · method · L652-L667 — def test_cache_hit_skips_network(self)
- test_stale_pre_v5_row_forces_recompute · method · L669-L695 — def test_stale_pre_v5_row_forces_recompute(self)
- test_cache_miss_calls_network_and_populates · method · L697-L710 — def test_cache_miss_calls_network_and_populates(self)
- test_malformed_cache_payload_treated_as_miss · method · L712-L727 — def test_malformed_cache_payload_treated_as_miss(self)
- test_degradation_is_not_cached · method · L729-L738 — def test_degradation_is_not_cached(self)
- test_manual_entry_does_not_touch_cache · method · L740-L750 — def test_manual_entry_does_not_touch_cache(self)
- ResolveArxivCacheTest · class · L753-L809 — class ResolveArxivCacheTest(unittest.TestCase)
- _entry · method · L756-L763 — def _entry(self, **overrides)
- test_cache_hit_skips_network · method · L765-L778 — def test_cache_hit_skips_network(self)
- test_stale_pre_v5_row_forces_recompute · method · L780-L796 — def test_stale_pre_v5_row_forces_recompute(self)
- test_cache_miss_populates · method · L798-L809 — def test_cache_miss_populates(self)
- SemanticScholarCacheTest · class · L812-L891 — class SemanticScholarCacheTest(unittest.TestCase)
- _entry · method · L818-L825 — def _entry(self, **overrides)
- test_cache_none_byte_equivalent · method · L827-L831 — def test_cache_none_byte_equivalent(self)
- test_cache_hit_skips_lookup · method · L833-L844 — def test_cache_hit_skips_lookup(self)
- test_stale_pre_v5_row_forces_recompute · method · L846-L862 — def test_stale_pre_v5_row_forces_recompute(self)
- test_cache_miss_populates · method · L864-L873 — def test_cache_miss_populates(self)
- test_manual_does_not_touch_cache · method · L875-L883 — def test_manual_does_not_touch_cache(self)
- test_degradation_not_cached · method · L885-L891 — def test_degradation_not_cached(self)
- ResolveDoiThenTitleQueriedByTest · class · L903-L950 — class ResolveDoiThenTitleQueriedByTest(unittest.TestCase)
- test_doi_match_queried_by_id · method · L907-L915 — def test_doi_match_queried_by_id(self)
- test_doi_present_but_unmatched_queried_by_id · method · L917-L928 — def test_doi_present_but_unmatched_queried_by_id(self)
- test_no_doi_unmatched_queried_by_title · method · L930-L940 — def test_no_doi_unmatched_queried_by_title(self)
- test_no_doi_title_match_queried_by_title · method · L942-L950 — def test_no_doi_title_match_queried_by_title(self)
- ResolveArxivQueriedByTest · class · L953-L981 — class ResolveArxivQueriedByTest(unittest.TestCase)
- test_arxiv_id_present_unmatched_queried_by_id · method · L956-L964 — def test_arxiv_id_present_unmatched_queried_by_id(self)
- test_arxiv_id_match_queried_by_id · method · L973-L981 — def test_arxiv_id_match_queried_by_id(self)