tests.test_mailmap moduleΒΆ

Tests for repomatic.mailmap: .mailmap parsing and contributor sync.

tests.test_mailmap.test_sync_mailmap_bootstraps_missing_file(tmp_path, monkeypatch, hermetic_git)[source]ΒΆ

A repository with no .mailmap yet gets one created instead of crashing.

The --create-if-missing default path used to read an unbound content variable when the source file did not exist.

tests.test_mailmap.test_sync_mailmap_leaves_the_tree_alone(tmp_path, monkeypatch, mailmap, args, message)[source]ΒΆ

A run with nothing to write, or writing to stdout, touches no file.

tests.test_mailmap.test_strip_generated_header()[source]ΒΆ
tests.test_mailmap.test_mailmap()[source]ΒΆ
tests.test_mailmap.test_new_entry()[source]ΒΆ
tests.test_mailmap.test_sync_mailmap_reports_a_git_failure(tmp_path, monkeypatch, hermetic_git)[source]ΒΆ

Outside a git repository the command fails with git’s own message.

tests.test_mailmap.test_strip_generated_header_reads_what_generated_header_writes()[source]ΒΆ

The reader drops exactly the block the writer stamps.

tests.test_mailmap.test_render_leaves_the_records_untouched()[source]ΒΆ

Rendering twice gives the same text: the top comment is not consumed.

tests.test_mailmap.test_update_from_git_matches_identities_without_case(monkeypatch)[source]ΒΆ

A contributor matching a record in another case is not added again.

tests.test_mailmap.test_update_from_git_raises_on_a_git_failure(monkeypatch)[source]ΒΆ

A failing git call reaches the caller with its message.