tests packageΒΆ

SubmodulesΒΆ

tests.conftest moduleΒΆ

tests.test_awesome_template moduleΒΆ

Tests for bundled awesome-template data and sync logic.

tests.test_awesome_template.test_bundled_files_exist()[source]ΒΆ

All expected awesome-template files are bundled in the package.

tests.test_awesome_template.test_copy_template_tree(tmp_path)[source]ΒΆ

_copy_template_tree copies all files and skips __init__.py.

tests.test_awesome_template.test_copy_template_tree_creates_directories(tmp_path)[source]ΒΆ

_copy_template_tree creates parent directories as needed.

tests.test_awesome_template.test_copied_files_contain_template_slug(tmp_path)[source]ΒΆ

Copied .github/ markdown files contain the template slug for rewriting.

tests.test_awesome_template.test_awesome_template_has_no_pyproject(tmp_path)[source]ΒΆ

awesome-template bundle does not contain pyproject.toml.

The lychee config is registered as a ToolConfigComponent with AWESOME_ONLY scope, so it goes through the standard merge path in _init_tool_configs instead of being blindly overwritten by _copy_template_tree.

tests.test_binary moduleΒΆ

tests.test_cache moduleΒΆ

tests.test_changelog moduleΒΆ

tests.test_checksums moduleΒΆ

tests.test_deps_graph moduleΒΆ

tests.test_dev_release moduleΒΆ

tests.test_dev_release.test_sync_dev_release_dry_run(tmp_path)[source]ΒΆ

Dry-run reports without calling gh.

tests.test_dev_release.test_sync_dev_release_live(tmp_path)[source]ΒΆ

Live mode creates new draft pre-release when none exists.

tests.test_dev_release.test_sync_dev_release_edits_existing(tmp_path)[source]ΒΆ

Edits existing release to preserve assets instead of delete+recreate.

tests.test_dev_release.test_sync_dev_release_cleans_stale_releases(tmp_path)[source]ΒΆ

Stale dev releases from previous versions are cleaned up.

tests.test_dev_release.test_sync_dev_release_empty_body(tmp_path)[source]ΒΆ

Returns False when changelog section produces an empty body.

tests.test_dev_release.test_sync_dev_release_body_content(tmp_path)[source]ΒΆ

Verifies the release body includes changelog changes.

tests.test_dev_release.test_cleanup_dev_releases_deletes_all_dev_tags()[source]ΒΆ

Deletes all releases whose tag ends with .dev0.

tests.test_dev_release.test_cleanup_dev_releases_no_dev_releases()[source]ΒΆ

No-op when no dev releases exist.

tests.test_dev_release.test_cleanup_dev_releases_list_failure()[source]ΒΆ

Silently succeeds when release listing fails.

tests.test_dev_release.test_cleanup_dev_releases_delete_failure()[source]ΒΆ

Continues cleaning when individual deletions fail.

tests.test_dev_release.test_cleanup_dev_releases_keeps_current_tag()[source]ΒΆ

Preserves the current version’s dev release when keep_tag is set.

tests.test_dev_release.test_edit_dev_release_success()[source]ΒΆ

Edits an existing release and returns True.

tests.test_dev_release.test_edit_dev_release_not_found()[source]ΒΆ

Returns False when the release does not exist.

tests.test_dev_release.test_delete_dev_release_success()[source]ΒΆ

Calls gh release delete with correct arguments.

tests.test_dev_release.test_delete_dev_release_missing()[source]ΒΆ

Silently succeeds when no dev release exists.

tests.test_dev_release.test_delete_release_by_tag_success()[source]ΒΆ

Calls gh release delete with the given tag.

tests.test_dev_release.test_delete_release_by_tag_immutable()[source]ΒΆ

Silently succeeds for immutable published releases.

tests.test_dev_release.test_delete_release_assets_success()[source]ΒΆ

Deletes assets and returns count.

tests.test_dev_release.test_delete_release_assets_no_release()[source]ΒΆ

Returns 0 when the release does not exist.

tests.test_dev_release.test_delete_release_assets_empty()[source]ΒΆ

Returns 0 when the release has no assets.

tests.test_dev_release.test_delete_release_assets_partial_failure()[source]ΒΆ

Continues when individual asset deletions fail.

tests.test_dev_release.test_upload_release_assets_success(tmp_path)[source]ΒΆ

Uploads matching files and skips unrelated ones.

tests.test_dev_release.test_upload_release_assets_no_files(tmp_path)[source]ΒΆ

Returns empty list and makes no gh calls when no matching files.

tests.test_dev_release.test_upload_release_assets_deletes_existing_first(tmp_path)[source]ΒΆ

Deletes existing assets before uploading new ones.

tests.test_dev_release.test_sync_dev_release_with_assets(tmp_path)[source]ΒΆ

End-to-end: metadata sync + asset upload.

tests.test_dev_release.test_sync_dev_release_dry_run_with_assets(tmp_path)[source]ΒΆ

Dry-run previews asset files without making gh calls.

tests.test_gh moduleΒΆ

tests.test_git_ops moduleΒΆ

tests.test_help moduleΒΆ

tests.test_images moduleΒΆ

tests.test_init_project moduleΒΆ

tests.test_lint_repo moduleΒΆ

Tests for repository linting module.

tests.test_lint_repo.test_successful_fetch()[source]ΒΆ

Fetch and parse repo metadata.

tests.test_lint_repo.test_empty_fields()[source]ΒΆ

Handle empty fields.

tests.test_lint_repo.test_api_failure()[source]ΒΆ

Handle API failure.

tests.test_lint_repo.test_json_parse_error()[source]ΒΆ

Handle JSON parse error.

tests.test_lint_repo.test_names_match()[source]ΒΆ

No warning when names match.

tests.test_lint_repo.test_names_differ()[source]ΒΆ

Warning when names differ.

tests.test_lint_repo.test_no_package_name()[source]ΒΆ

Skip when no package name.

tests.test_lint_repo.test_not_sphinx()[source]ΒΆ

Skip when not a Sphinx project.

tests.test_lint_repo.test_sphinx_with_website()[source]ΒΆ

No warning when Sphinx project has website.

tests.test_lint_repo.test_sphinx_without_website()[source]ΒΆ

Warning when Sphinx project has no website.

tests.test_lint_repo.test_sphinx_fetches_metadata()[source]ΒΆ

Fetch metadata when homepage_url not provided.

tests.test_lint_repo.test_descriptions_match()[source]ΒΆ

No error when descriptions match.

tests.test_lint_repo.test_descriptions_differ()[source]ΒΆ

Error when descriptions differ.

tests.test_lint_repo.test_no_project_description()[source]ΒΆ

Skip when no project description.

tests.test_lint_repo.test_fetches_metadata()[source]ΒΆ

Fetch metadata when repo_description not provided.

tests.test_lint_repo.test_all_checks_pass(capsys)[source]ΒΆ

Return 0 when all checks pass.

tests.test_lint_repo.test_description_mismatch(capsys)[source]ΒΆ

Return 1 when description mismatches.

tests.test_lint_repo.test_package_name_warning(capsys)[source]ΒΆ

Emit warning for package name mismatch but still pass.

tests.test_lint_repo.test_website_warning(capsys)[source]ΒΆ

Emit warning for missing website but still pass.

tests.test_lint_repo.test_minimal_run(capsys)[source]ΒΆ

Run with no checks enabled.

tests.test_lint_repo.test_topics_no_keywords()[source]ΒΆ

Skip when no keywords provided.

tests.test_lint_repo.test_topics_all_in_keywords()[source]ΒΆ

No warning when all topics are in keywords.

tests.test_lint_repo.test_topics_extra_not_in_keywords()[source]ΒΆ

Warning when topics exist that are not in keywords.

tests.test_lint_repo.test_topics_api_failure()[source]ΒΆ

Skip gracefully when API call fails.

tests.test_lint_repo.test_topics_empty_response()[source]ΒΆ

Skip when no topics are set on the repo.

tests.test_lint_repo.test_funding_file_exists(tmp_path, monkeypatch)[source]ΒΆ

No warning when funding file already exists.

tests.test_lint_repo.test_funding_file_exists_lowercase(tmp_path, monkeypatch)[source]ΒΆ

Detect funding file regardless of case.

tests.test_lint_repo.test_funding_missing_with_sponsors(tmp_path, monkeypatch)[source]ΒΆ

Warning when owner has sponsors but no funding file.

tests.test_lint_repo.test_funding_skipped_for_fork(tmp_path, monkeypatch)[source]ΒΆ

Skip funding check for forked repositories.

tests.test_lint_repo.test_funding_skipped_no_sponsors(tmp_path, monkeypatch)[source]ΒΆ

Skip when owner has no GitHub Sponsors listing.

tests.test_lint_repo.test_funding_api_failure(tmp_path, monkeypatch)[source]ΒΆ

Skip gracefully when GraphQL API call fails.

tests.test_lint_repo.test_funding_json_parse_error(tmp_path, monkeypatch)[source]ΒΆ

Skip gracefully when API returns invalid JSON.

tests.test_lint_repo.test_stale_drafts_detected()[source]ΒΆ

Warn about draft releases that are not dev pre-releases.

tests.test_lint_repo.test_stale_drafts_none()[source]ΒΆ

No warning when only dev pre-release drafts exist.

tests.test_lint_repo.test_stale_drafts_api_failure()[source]ΒΆ

Skip gracefully when API call fails.

tests.test_lint_repo.test_stale_drafts_multiple()[source]ΒΆ

List all stale draft tags in the warning.

tests.test_lint_repo.test_pat_contents_permission_pass()[source]ΒΆ

Pass when contents API call succeeds.

tests.test_lint_repo.test_pat_contents_permission_fail()[source]ΒΆ

Fail when contents API call raises.

tests.test_lint_repo.test_pat_issues_permission_pass()[source]ΒΆ

Pass when issues API call succeeds.

tests.test_lint_repo.test_pat_issues_permission_fail()[source]ΒΆ

Fail when issues API call raises.

tests.test_lint_repo.test_pat_pull_requests_permission_pass()[source]ΒΆ

Pass when pulls API call succeeds.

tests.test_lint_repo.test_pat_pull_requests_permission_fail()[source]ΒΆ

Fail when pulls API call raises.

tests.test_lint_repo.test_pat_vulnerability_alerts_permission_pass()[source]ΒΆ

Pass when vulnerability-alerts API call succeeds.

tests.test_lint_repo.test_pat_vulnerability_alerts_permission_fail()[source]ΒΆ

Fail when vulnerability-alerts API call raises.

tests.test_lint_repo.test_pat_workflows_permission_pass()[source]ΒΆ

Pass when workflows API call succeeds.

tests.test_lint_repo.test_pat_workflows_permission_fail()[source]ΒΆ

Fail when workflows API call raises.

tests.test_lint_repo.test_pat_checks_skipped_without_pat(capsys)[source]ΒΆ

PAT checks are skipped when has_pat is False.

tests.test_lint_repo.test_pat_checks_all_pass(capsys)[source]ΒΆ

Return 0 when all PAT capability checks pass.

tests.test_lint_repo.test_pat_checks_fail_on_missing_permission(capsys)[source]ΒΆ

Return 1 when a PAT capability check fails.

tests.test_lint_repo.test_pat_checks_no_sha(capsys)[source]ΒΆ

Commit statuses check is skipped when no SHA provided.

tests.test_mailmap moduleΒΆ

tests.test_mailmap.test_remove_header()[source]ΒΆ
tests.test_mailmap.test_mailmap()[source]ΒΆ
tests.test_mailmap.test_new_entry()[source]ΒΆ

tests.test_matrix moduleΒΆ

tests.test_metadata moduleΒΆ

tests.test_platform_keys moduleΒΆ

tests.test_pr_body moduleΒΆ

tests.test_pyproject moduleΒΆ

Tests for pyproject.toml utilities.

tests.test_pyproject.test_get_project_name_from_cwd(tmp_path, monkeypatch)[source]ΒΆ

Test that get_project_name reads from pyproject.toml in CWD.

tests.test_pyproject.test_get_project_name_missing_pyproject(tmp_path, monkeypatch)[source]ΒΆ

Test that get_project_name returns None when no pyproject.toml.

tests.test_pyproject.test_get_project_name_no_project_section(tmp_path, monkeypatch)[source]ΒΆ

Test that get_project_name returns None when no [project] section.

tests.test_pyproject.test_get_project_name_with_preloaded_data()[source]ΒΆ

Test that get_project_name accepts pre-parsed pyproject data.

tests.test_readme moduleΒΆ

Tests for readme.md documentation sync with code.

tests.test_readme.test_readme_cli_help_matches()[source]ΒΆ

CLI help output in readme.md must match actual repomatic --help.

Return type:

None

tests.test_readme.test_readme_config_table_matches()[source]ΒΆ

Config table in readme.md must match show-config output.

Return type:

None

tests.test_readme.test_readme_bridge_table_covers_registry()[source]ΒΆ

The bridge table must list every registry tool that supports translation.

A tool supports [tool.X] translation when it does not natively read pyproject.toml (reads_pyproject=False) and can receive a translated config via either a config_flag or native_config_files in a non-editorconfig format (editorconfig files are shared across tools and not suitable as single-tool bridge targets).

Return type:

None

tests.test_readme.test_readme_tip_table_covers_registry()[source]ΒΆ

The TIP table must list every registry tool that natively reads pyproject.toml.

Tools with reads_pyproject=True in the registry should appear in the TIP admonition table. The table may also list non-registry tools (e.g., coverage.py, pytest, uv) that the workflows use and that natively read [tool.*] sections.

Return type:

None

tests.test_release_prep moduleΒΆ

tests.test_release_sync moduleΒΆ

tests.test_renovate moduleΒΆ

tests.test_tool_runner moduleΒΆ

tests.test_virustotal moduleΒΆ

tests.test_workflow_sync moduleΒΆ

tests.test_workflows moduleΒΆ