tests.test_config module¶

Tests for the [tool.repomatic] schema, focused on ecosystem flavors.

tests.test_config.test_supported_agents_are_real_extra_platforms_traits()[source]¶

Every agent repomatic lays out must exist upstream.

The whole point of borrowing extra-platforms’ vocabulary is that repomatic never invents an ID of its own, so a typo here fails loudly.

tests.test_config.test_flavor_defaults_are_real_extra_platforms_traits()[source]¶

Both defaults must be drawn from the upstream vocabularies.

tests.test_config.test_flavor_defaults()[source]¶

An unconfigured project targets Claude Code on GitHub Actions.

tests.test_config.test_flavor_normalizes_spelling(field, value, expected)[source]¶

Hyphens, case and padding all resolve to the upstream trait ID.

tests.test_config.test_flavor_rejects_unknown_trait(field, value)[source]¶

A value outside the upstream vocabulary reads as a typo.

tests.test_config.test_flavor_rejects_unsupported_ecosystem(field, value)[source]¶

A real ecosystem repomatic cannot target says so, not “unknown”.

tests.test_config.CURSOR_LAYOUT = AgentLayout(skills='./.cursor/skills/', subagents='./.cursor/agents/', settings='./.cursor/settings.json')¶

Stand-in layout for an agent repomatic does not target, used to prove the flavor actually drives the locations rather than the Claude Code defaults coinciding with them.

tests.test_config.test_default_locations_come_from_the_agent_layout()[source]¶

The layout table is the single source of truth for every default.

tests.test_config.test_locations_follow_the_agent_flavor(monkeypatch)[source]¶

Selecting another agent moves the assets to that agent’s layout.

tests.test_config.test_explicit_locations_override_the_flavor(monkeypatch, overrides, expected)[source]¶

An explicit location outranks whatever the agent prefers.

Each location is checked on its own, so overriding one never drags the others off the flavor’s layout.

tests.test_config.test_load_repomatic_config_defaults(tmp_path, monkeypatch)[source]¶

Test that load_repomatic_config returns a Config instance with defaults.

tests.test_config.test_load_repomatic_config_custom_values(tmp_path, monkeypatch)[source]¶

Test that load_repomatic_config reads custom values from pyproject.toml.

tests.test_config.test_load_repomatic_config_with_preloaded_data()[source]¶

Test that load_repomatic_config accepts pre-parsed pyproject data.

tests.test_config.test_site_deploy_accepts_every_implemented_target(target)[source]¶

Each target names a deploy job in docs.yaml, so each must load.

tests.test_config.test_site_deploy_rejects_a_target_with_no_job_behind_it()[source]¶

An unimplemented target would publish nowhere, from a green workflow.

The docs.yaml jobs gate on equality with a known value, so a typo or a host nobody wired up simply matches neither, and the run reports success having deployed nothing at all.

tests.test_config.test_site_cloudflare_settings_load_from_their_table()[source]¶

The drift-check declarations ride the same site.* table.

tests.test_config.test_site_cloudflare_placement_rejects_unknown_modes()[source]¶

A bad placement mode must die here, not in a Cloudflare PATCH response.

The value is written verbatim to the live project by cloudflare-pages –apply, so the API rejection would surface far from the pyproject.toml line that caused it.

tests.test_config.test_site_cloudflare_r2_keys_load_from_their_table()[source]¶
tests.test_config.test_site_cloudflare_r2_keys_come_as_a_pair(site)[source]¶

A bucket with nowhere to redirect, or a host with nothing to upload to, would only fail at the first oversized file, deep in a deploy.

tests.test_config.test_site_cloudflare_r2_domain_must_be_a_bare_hostname()[source]¶

The offload writes https://{domain}/{key}: a scheme would double.

tests.test_config.test_lint_repo_declined_keeps_its_keys_verbatim()[source]¶

A declined entry is named by a tool’s own keys, so none may be rewritten.

Key normalization would turn extend-select into extend_select, which names no key of [tool.ruff]: the entry would then decline nothing.

tests.test_config.test_lint_repo_declined_entries_keep_what_is_not_a_reason(declined, expected)[source]¶

A leaf holding no reason stays in the answer, for lint-repo to report.

tests.test_config.test_load_repomatic_config_warns_unknown_keys(tmp_path, monkeypatch, caplog)[source]¶

Unknown keys in [tool.repomatic] produce a warning, not an error.

tests.test_config.test_load_repomatic_config_warns_unknown_keys_once(tmp_path, monkeypatch, caplog)[source]¶

Re-loading the same project reports its unknown keys only once.

Every helper needing a setting re-loads the config, so without the per-project dedup a single stale key floods each invocation’s output.

tests.test_config.test_config_reference()[source]¶

Config reference table covers all Config fields with descriptions.