tests.test_gitignore moduleΒΆ

Tests for .gitignore generation from gitignore.io templates.

tests.test_gitignore.test_build_gitignore_requests_base_categories()[source]ΒΆ

The base categories are fetched and the response body is returned.

tests.test_gitignore.test_build_gitignore_merges_and_dedupes_extra_categories()[source]ΒΆ

Extra categories append in order, and duplicates of a base one drop.

tests.test_gitignore.test_build_gitignore_appends_extra_content()[source]ΒΆ

Configured extra content is appended after the fetched template.

tests.test_gitignore.test_build_gitignore_propagates_fetch_error()[source]ΒΆ

A failed gitignore.io fetch surfaces to the caller, not silently empty.

tests.test_gitignore.test_parse_rules(content, expected)[source]ΒΆ

Only the lines git matches paths against survive parsing.

tests.test_gitignore.test_orphaned_rules_reports_what_the_sync_would_lose()[source]ΒΆ

A rule on disk and absent from the rebuild is reported.

tests.test_gitignore.test_orphaned_rules_empty_when_nothing_is_lost(existing, generated)[source]ΒΆ

Rewrites that keep every rule report no orphan, whatever the layout.