← Về thư mục
tests/markitdown/test_scripts.py
- ExtensionTests · class · L43-L79 — class ExtensionTests(unittest.TestCase)
- test_extensions_are_lowercased_dotted_and_deduplicated · method · L44-L48 — def test_extensions_are_lowercased_dotted_and_deduplicated(self) -> None
- test_blank_entries_are_dropped · method · L50-L51 — def test_blank_entries_are_dropped(self) -> None
- test_an_empty_selection_is_refused · method · L53-L55 — def test_an_empty_selection_is_refused(self) -> None
- test_a_lone_dot_is_refused · method · L57-L59 — def test_a_lone_dot_is_refused(self) -> None
- test_the_result_is_sorted_so_runs_are_reproducible · method · L61-L65 — def test_the_result_is_sorted_so_runs_are_reproducible(self) -> None
- test_the_defaults_carry_no_audio_or_video_formats · method · L67-L71 — def test_the_defaults_carry_no_audio_or_video_formats(self) -> None: # Converting those with markitdown[all] would ship the file to Google # Web Speech; they must be opt-in, never a default.
- test_the_defaults_are_sorted_lowercase_and_dotted · method · L73-L79 — def test_the_defaults_are_sorted_lowercase_and_dotted(self) -> None
- DiscoveryTestCase · class · L82-L92 — class DiscoveryTestCase(unittest.TestCase)
- setUp · method · L83-L86 — def setUp(self) -> None
- touch · method · L88-L92 — def touch(self, relative: str) -> Path
- DiscoveryTests · class · L95-L133 — class DiscoveryTests(DiscoveryTestCase)
- test_only_the_requested_extensions_are_returned · method · L96-L101 — def test_only_the_requested_extensions_are_returned(self) -> None
- test_matching_is_case_insensitive · method · L103-L106 — def test_matching_is_case_insensitive(self) -> None
- test_recursion_is_opt_in · method · L108-L116 — def test_recursion_is_opt_in(self) -> None
- test_directories_are_never_returned · method · L118-L122 — def test_directories_are_never_returned(self) -> None
- test_the_order_is_deterministic · method · L124-L128 — def test_the_order_is_deterministic(self) -> None
- test_an_empty_directory_yields_nothing · method · L130-L133 — def test_an_empty_directory_yields_nothing(self) -> None
- OutputPathTests · class · L136-L156 — class OutputPathTests(unittest.TestCase)
- test_the_source_suffix_is_kept_in_the_output_name · method · L137-L148 — def test_the_source_suffix_is_kept_in_the_output_name(self) -> None: # Without this, report.pdf and report.docx both become report.md and # the second silently overwrites the first.
- test_the_directory_layout_is_mirrored · method · L150-L156 — def test_the_directory_layout_is_mirrored(self) -> None
- AtomicWriteTests · class · L159-L179 — class AtomicWriteTests(DiscoveryTestCase)
- test_the_content_lands_at_the_destination · method · L160-L163 — def test_the_content_lands_at_the_destination(self) -> None
- test_no_temporary_file_survives · method · L165-L168 — def test_no_temporary_file_survives(self) -> None
- test_an_existing_file_is_replaced_wholesale · method · L170-L174 — def test_an_existing_file_is_replaced_wholesale(self) -> None
- test_non_ascii_content_survives_the_round_trip · method · L176-L179 — def test_non_ascii_content_survives_the_round_trip(self) -> None
- MetadataInferenceTests · class · L182-L219 — class MetadataInferenceTests(unittest.TestCase)
- test_an_author_year_title_filename_is_parsed · method · L183-L189 — def test_an_author_year_title_filename_is_parsed(self) -> None
- test_a_multi_word_author_is_kept_whole · method · L191-L196 — def test_a_multi_word_author_is_kept_whole(self) -> None
- test_only_plausible_years_are_accepted · method · L198-L205 — def test_only_plausible_years_are_accepted(self) -> None: # 1899 and 2101 are not publication years the pattern should trust.
- test_an_unstructured_filename_still_yields_a_readable_title · method · L207-L213 — def test_an_unstructured_filename_still_yields_a_readable_title(self) -> None
- test_runs_of_whitespace_are_collapsed · method · L215-L219 — def test_runs_of_whitespace_are_collapsed(self) -> None
- DigestTests · class · L222-L245 — class DigestTests(DiscoveryTestCase)
- test_the_digest_matches_hashlib · method · L223-L229 — def test_the_digest_matches_hashlib(self) -> None
- test_an_empty_file_hashes_to_the_empty_digest · method · L231-L236 — def test_an_empty_file_hashes_to_the_empty_digest(self) -> None
- test_a_file_larger_than_one_chunk_is_hashed_whole · method · L238-L245 — def test_a_file_larger_than_one_chunk_is_hashed_whole(self) -> None: # The reader streams in 1 MiB chunks; a bug there would hash a prefix.
- YamlScalarTests · class · L248-L258 — class YamlScalarTests(unittest.TestCase)
- test_ordinary_text_is_quoted · method · L249-L250 — def test_ordinary_text_is_quoted(self) -> None
- test_quotes_and_colons_are_escaped_safely · method · L252-L255 — def test_quotes_and_colons_are_escaped_safely(self) -> None: # An unquoted colon would end the YAML key and corrupt the front matter.
- test_non_ascii_is_preserved_rather_than_escaped · method · L257-L258 — def test_non_ascii_is_preserved_rather_than_escaped(self) -> None
- InstallationReportTests · class · L261-L275 — class InstallationReportTests(unittest.TestCase)
- test_the_report_names_the_target_version_and_optional_extras · method · L262-L264 — def test_the_report_names_the_target_version_and_optional_extras(self) -> None
- test_the_report_is_json_serialisable · method · L266-L267 — def test_the_report_is_json_serialisable(self) -> None
- test_an_absent_distribution_reports_none_rather_than_raising · method · L269-L272 — def test_an_absent_distribution_reports_none_rather_than_raising(self) -> None
- test_an_installed_distribution_reports_its_version · method · L274-L275 — def test_an_installed_distribution_reports_its_version(self) -> None