tests package¶
Submodules¶
tests.conftestmoduletests.test_actionmoduleBASE_HEADERSPLAIN_HEADERSPARTLESS_HEADERSREWRITTEN_BY_THE_GENERATORtest_action_definition()SELECTIONDISCARDDISCARD_AND_UNIQUEtest_action_matrix()test_trail_lines_tell_a_dry_run_apart()test_trail_lists_mails_in_a_stable_order()test_delete_selected_spares_mails_without_duplicates()test_assert_stats_consistent_passes()inodes()test_hardlink_discarded_collapses_copies_onto_one_file()test_hardlink_discarded_dry_run_leaves_files_alone()DIFFERING_COPIEStest_hardlink_discarded_gates_on_byte_equality()test_hardlink_discarded_is_idempotent()test_hardlink_that_cannot_be_created_leaves_the_mail()test_hardlink_discarded_leaves_file_based_box_alone()test_export_keeps_mail_bytes()DELIVERY_TIMEtest_export_keeps_maildir_metadata()test_export_keeps_mbox_envelope()test_export_keeps_mh_sequences()test_export_translates_no_metadata_across_formats()test_unique_only_source_is_exported()
tests.test_bug_reportmoduleDOOMED_IDMAIL_FACTORY_CONTENTPERSONALPREAMBLE_MAILEIGHT_BIT_MAILreport_url()report_block()saved_report()fail_on_doomed()worker_state()test_fingerprint_shows_no_content()test_fingerprint_shows_mime_structure()test_fingerprint_shows_8bit_values()test_fingerprint_describes_broken_mails()test_fingerprint_shows_header_values()test_fingerprint_masks_comments()test_fingerprint_failure_is_reported()test_bytes_recovered_from_surrogates()test_fingerprint_length_is_capped()test_issues_url_matches_package_metadata()test_traceback_holds_no_path()test_traceback_starts_in_the_blamed_block()dive()test_traceback_keeps_the_innermost_frames()test_failure_describes_its_error()test_unknown_box_format_shows_its_class()test_failure_log_keeps_a_few_samples()test_title_names_the_innermost_function_of_mdedup()KINDS_OF_ERRORtest_failure_log_details_a_few_kinds()test_report_version_matches_version_option()test_report_links_the_form_and_names_the_sources()test_hashing_error_sets_the_mail_aside()test_mail_failing_to_read_is_rejected_or_set_aside()test_hash_only_reports_failures()test_debug_log_holds_traceback_of_samples()test_report_masks_paths_and_regexps()test_selection_error_skips_the_set()test_action_error_names_its_mail()test_error_before_the_steps_ends_with_a_report()test_action_system_error_is_one_line()test_hashing_worker_rejects_or_sets_aside_its_mail()test_hashing_worker_leaves_a_mail_with_too_few_headers_unhashed()test_selection_worker_skips_its_set()test_statistics_self_check_reports_a_bug()test_saved_reports_never_overwrite()test_report_stands_alone_when_it_cannot_be_saved()
tests.test_cachemodulecount_hashes()cache_db()cached_run()test_cache_is_off_by_default()test_default_cache_dir()test_default_cache_path_sits_under_the_cache_dir()test_warm_run_matches_uncached_run()test_settings_change_discards_the_cache()test_modified_mail_is_rehashed()test_edited_file_based_box_invalidates_every_mail()test_mail_vanishing_mid_run_is_rejected()test_unusable_cache_does_not_abort_the_run()test_corrupt_cache_is_skipped_and_closed()test_unhashed_mails_are_not_cached()cached_rows()test_deleted_mails_are_pruned()test_vanished_box_is_pruned()test_unvisited_boxes_are_left_alone()test_run_survives_a_database_held_by_another_run()test_cache_survives_a_corpus_growing_between_runs()
tests.test_climoduleacted_upon()test_bare_call()test_no_progress_bar_label_off_a_terminal()test_no_log_line_is_left_empty()test_early_export_file_check()test_theme_styles_runtime_output()test_cli_test_suite()test_parallel_run_matches_sequential()test_sources_changed_between_steps()test_memory_stays_bounded_while_hashing()test_hash_only_prints_headers()test_single_hash_header_needs_no_minimal_flag()test_too_few_headers_leaves_mail_unhashed()applied_options()preset_args()test_preset_is_an_alias_of_its_options()test_preset_yields_to_an_option_set_by_the_user()test_preset_takes_some_options_without_a_warning()test_preset_thresholds_stay_on_without_its_hashing()test_preset_thresholds_rely_on_its_hashing()test_raw_headers_refuse_a_header_list()test_conservative_preset_keeps_near_copies()test_raw_headers_hash_a_mail_lacking_headers()test_raw_headers_hash_only_shows_every_header()test_conservative_preset_parallel_run_matches_sequential()test_headers_table_rendered_only_when_logged()test_invalid_option_value_rejected()test_regexp_type_keeps_compiled_expression()test_duplicate_source_rejected()test_hash_only_warns_about_ignored_options()test_main_entrypoint_reports_version()test_main_refuses_to_run_in_a_worker()UNGUARDED_LAUNCHERtest_unguarded_launcher_stops_in_each_worker()
tests.test_configmodulemake_config()test_config_file_drives_run()test_config_regexps_list()test_config_regexps_number()test_config_kebab_case_keys()test_config_unknown_key_rejected()test_config_preset()test_config_value_overrides_a_preset()test_config_mail_sources_blocked()test_config_values_checked()test_cli_overrides_config()test_pyproject_autodiscovery()test_params_reflects_autodiscovered_config()test_export_config_toml_roundtrip()
tests.test_docsmoduleTESTS_DIRPROJECT_ROOTDOCS_DIRTESTS_PAGEASSETS_DIRCAPTURE_SCRIPTCLI_PAGEDESIGN_PAGEFORMATS_PAGENO_DOCStest_design_page_spells_out_each_preset()test_every_test_module_has_a_page()test_formats_page_lists_each_box_format()test_cli_page_renders_the_command_tree()test_every_cli_capture_is_embedded()test_pages_show_the_command_their_picture_runs()test_cli_capture_prompts_fit_their_window()test_captures_run_outside_any_agent()test_self_referencing_urls_name_a_file_the_tree_holds()
tests.test_mailmodulecreate_mail_from_bytes()create_mail_with_headers()test_body_hashes_distinguish_and_normalize()test_raw_body_hash_reads_the_bytes_of_the_box()test_raw_headers_hash_the_header_block()test_raw_bytes_come_from_the_file_or_the_box()test_raw_body_starts_where_the_parser_ends_the_headers()test_size_counts_the_bytes_of_the_decoded_body()test_body_lines_gathers_multipart_preamble_and_epilogue()multipart_mail()test_body_lines_decodes_each_part()test_header_normalization()test_raw_8bit_headers_hash_apart()test_raw_8bit_date_parses()test_normalizers_read_raw_8bit_bytes()test_unparsable_date_returns_none()test_mail_path_derived_from_box()load_single_mail()test_dehydrate_hydrate_roundtrip()test_dehydrated_mail_defers_body_reads()
tests.test_mail_boxmodulestdlib_box_types()LOCKING_FORMATStest_box_format_definition()test_box_formats_cover_stdlib()test_box_roundtrip()test_dedup_across_formats()test_run_cut_short_unlocks_boxes()STOP_POINTSTOPPABLE_RUNtest_killed_run_needs_force_unlock()test_refused_lock_keeps_no_file_open()test_refused_subfolder_lock_unlocks_the_folders_before_it()test_create_box_refuses_to_clobber_existing()test_nonexistent_path()test_unusable_source()test_file_autodetect()test_every_format_is_autodetected()test_mh_detection_needs_sequences_file()test_dedup_mixes_autodetected_formats()test_source_without_mail_warns()test_verbatim_nested_maildirs()test_verbatim_forced_maildir_format()test_mixed_maildir_folder_conventions()test_maildir_without_tmp_warns()test_eml_autodetect_and_dedup()test_eml_export_format()test_eml_add_keeps_header_folding()test_eml_nonexistent_box_raises()test_eml_membership()test_eml_missing_key_raises_keyerror()test_eml_folders_unsupported()test_eml_single_mail_box()test_single_mail_files_dedup()THUNDERBIRD_SUMMARYTHUNDERBIRD_FILTERSbuild_thunderbird_tree()test_thunderbird_tree_autodetect_and_dedup()test_mbox_tree_skips_names_thunderbird_hides()test_mbox_tree_refused_lock_unlocks_the_folders_before_it()test_mbox_tree_past_the_limit_of_open_files()HOLD_PROFILE_LOCKthunderbird_running()build_thunderbird_profile()test_thunderbird_open_refuses_to_remove_mails()test_thunderbird_open_allows_runs_that_remove_no_mail()test_thunderbird_closed_lets_the_run_remove_mails()test_thunderbird_forced_mbox_format()build_thunderbird_maildir_tree()test_thunderbird_maildir_tree_autodetect_and_dedup()test_thunderbird_maildir_folder_forced_format()
tests.test_mail_integrationmoduleDATELESS_HASH_HEADERStest_invalid_date_parsing()undated_maildated_mailtest_missing_date_header_skips_time_strategy()test_unparsable_date_skips_time_strategy()test_unparsable_date_show_diff()test_hash_body()test_ctime_time_source()test_mtime_time_source()test_mail_with_too_few_headers_is_kept()test_crlf_and_lf_bodies_are_duplicates()
tests.test_performancemoduleRETAINED_BYTES_CEILINGdeep_size()index_footprint()count_hashing_reads()test_hashing_reads_each_mail_once()test_retained_memory_stays_flat_as_the_corpus_grows()test_retained_memory_does_not_track_mail_size()test_retained_mails_carry_neither_path_nor_payload()test_parallel_hashing_only_claims_folder_boxes()test_step_falls_back_when_its_pool_will_not_start()test_single_mail_sets_are_not_handed_to_workers()test_large_duplicate_sets_do_not_diff_every_pair()
tests.test_strategymoduletest_strategy_enum_has_no_hidden_alias()test_strategy_definition()test_maildir_dry_run()test_maildir_strategy()test_strategy_is_deterministic()test_quantity_strategies_rule_on_the_first_path()undated_mailtest_strategy_fallback_resolves_identical_copies()test_strategy_fallback_on_missing_timestamp()test_strategy_cascade_exhausted()test_time_strategy_alone_cannot_split_same_timestamp_set()test_strategy_cascade_dedup_aliases()PATH_STRATEGIEStest_strategy_cascade_regexp()test_empty_regexp_counts_as_unset()NO_PATHtest_regexp_cascade()outlier_mailtest_outlier_eviction_keeps_core_dedup()test_size_strategy_ignores_set_aside_mails()test_set_aside_resets_cached_properties()test_dissimilar_pair_still_skipped()test_eviction_is_not_transitive()test_threshold_checks_disabled()test_no_strategy_skips_duplicate_sets()DISSIMILAR_PAIRtest_show_diff_starts_from_the_lowest_path()test_show_diff_is_colored_by_the_theme()test_content_difference_counts_bytes()test_thresholds_read_no_body_the_hash_already_covers()test_size_check_alone_reads_no_body()test_raw_hash_keeps_the_size_safeguard()test_content_dissimilar_pair_skipped()