← Về thư mục
scripts/adapters/tests/test_folder_scan.py
- _run · function · L18-L24 — def _run(*args, cwd=None)
- test_adapter_exists · function · L27-L28 — def test_adapter_exists()
- test_happy_path · function · L31-L51 — def test_happy_path(tmp_path, load_yaml, clean_timestamps)
- test_empty_folder_emits_empty_passport · function · L54-L68 — def test_empty_folder_emits_empty_passport(tmp_path)
- test_missing_input_dir_fails_loud · function · L71-L78 — def test_missing_input_dir_fails_loud(tmp_path)
- test_deterministic_output · function · L81-L93 — def test_deterministic_output(tmp_path, load_yaml, clean_timestamps)
- test_duplicate_collision_handled · function · L96-L115 — def test_duplicate_collision_handled(tmp_path): # Two files that would produce the same base citation_key should each be # accepted with a disambiguating suffix.
- test_filename_with_spaces_produces_valid_uri · function · L118-L135 — def test_filename_with_spaces_produces_valid_uri(tmp_path): # Codex P1: spaces and reserved chars in filenames must be percent-encoded # in source_pointer so it is a valid RFC 8089 file:// URI.
- test_chen2024_no_tail_uses_empty_title_hint · function · L138-L154 — def test_chen2024_no_tail_uses_empty_title_hint(tmp_path): # Codex P3: empty title_hint exercises make_citation_key fallback path.
- test_mixed_valid_invalid_in_nested_tree · function · L157-L184 — def test_mixed_valid_invalid_in_nested_tree(tmp_path): # Codex P3: mixed valid+invalid across subdirs. Also covers Codex P2b: # rejected entries with the same basename in different subdirs must be # distinguishable via a relative-path
source field.
- test_symlink_pointing_outside_input_does_not_crash · function · L187-L222 — def test_symlink_pointing_outside_input_does_not_crash(tmp_path): # Symlinks escaping the scanned root can disclose files the user did not # intend to include, so they are rejected instead of followed.
- test_parseable_non_pdf_extension · function · L225-L239 — def test_parseable_non_pdf_extension(tmp_path): # Codex P3: filename parser is extension-agnostic — non-PDF parseable # files should still be accepted (e.g. .epub, .djvu, .ps).
- test_folder_scan_venue_type_always_unknown · function · L244-L260 — def test_folder_scan_venue_type_always_unknown(tmp_path, load_yaml)