Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Repomatic has been maintained for 4+ years, and is free to use. You can help if you 🀝 purchase business support or 🫢 sponsor the project.
Repomatic
Light Logo Dark Logo
  • Installation
  • CLI
  • Man pages
  • Configuration
  • Dependency management
  • Tool runner
  • Reusable workflows
  • Test matrix
  • Nuitka compilation
  • Security
  • Benchmark

Agent tooling

  • Agent skills
  • Subagents
  • Claude Code plugin

Contributing

  • Contributing
  • Commit messages
  • Upstream development
  • Automated operation contracts
  • Packaging
  • Upstream
  • Code of conduct

API reference

  • repomatic package
    • repomatic.cli package
      • repomatic.cli.github module
      • repomatic.cli.lint module
      • repomatic.cli.main module
      • repomatic.cli.release module
      • repomatic.cli.sample module
      • repomatic.cli.setup module
      • repomatic.cli.sync module
    • repomatic.data package
      • repomatic.data.awesome_template package
    • repomatic.deps package
      • repomatic.deps.dep_graph module
      • repomatic.deps.dep_policy module
      • repomatic.deps.dep_report module
      • repomatic.deps.dep_sources module
      • repomatic.deps.uv module
      • repomatic.deps.vulnerable_deps module
    • repomatic.github package
      • repomatic.github.actions module
      • repomatic.github.ci_status module
      • repomatic.github.dev_release module
      • repomatic.github.gh module
      • repomatic.github.issue module
      • repomatic.github.job_timings module
      • repomatic.github.matrix module
      • repomatic.github.pr module
      • repomatic.github.pr_body module
      • repomatic.github.release_sync module
      • repomatic.github.releases module
      • repomatic.github.sponsor module
      • repomatic.github.status module
      • repomatic.github.token module
      • repomatic.github.unsubscribe module
      • repomatic.github.workflow_sync module
    • repomatic.metadata package
      • repomatic.metadata.core module
      • repomatic.metadata.env module
      • repomatic.metadata.git module
      • repomatic.metadata.matrix module
      • repomatic.metadata.project module
    • repomatic.release package
      • repomatic.release.attestation module
      • repomatic.release.binaries_page module
      • repomatic.release.binary module
      • repomatic.release.checksums module
      • repomatic.release.prepare_release module
      • repomatic.release.version_sync module
      • repomatic.release.virustotal module
    • repomatic.templates package
    • repomatic.tooling package
      • repomatic.tooling.bundle module
      • repomatic.tooling.plugin module
      • repomatic.tooling.tool_registry module
      • repomatic.tooling.tool_runner module
    • repomatic.awesome_toc module
    • repomatic.broken_links module
    • repomatic.cache module
    • repomatic.changelog module
    • repomatic.cloudflare module
    • repomatic.cloudflare_r2 module
    • repomatic.compat module
    • repomatic.config module
    • repomatic.docs module
    • repomatic.file_inventory module
    • repomatic.file_ops module
    • repomatic.forge module
    • repomatic.frontmatter module
    • repomatic.git_ops module
    • repomatic.gitignore module
    • repomatic.hashing module
    • repomatic.http module
    • repomatic.humanize module
    • repomatic.images module
    • repomatic.init_project module
    • repomatic.labels module
    • repomatic.lint_repo module
    • repomatic.mailmap module
    • repomatic.matrix_axes module
    • repomatic.metric_chart module
    • repomatic.metrics module
    • repomatic.npm module
    • repomatic.pages_redirects module
    • repomatic.pypi module
    • repomatic.pyproject module
    • repomatic.registry module
    • repomatic.runner_catalog module
    • repomatic.runner_images module
    • repomatic.setup_guide module
    • repomatic.sync_ops module
    • repomatic.tabular module
    • repomatic.versions module
  • tests package
    • tests.conftest module
    • tests.test_actions module
    • tests.test_attestation module
    • tests.test_awesome_template module
    • tests.test_awesome_toc module
    • tests.test_binaries_page module
    • tests.test_binary module
    • tests.test_broken_links module
    • tests.test_cache module
    • tests.test_changelog module
    • tests.test_checksums module
    • tests.test_ci_status module
    • tests.test_claude_assets module
    • tests.test_cloudflare module
    • tests.test_cloudflare_r2 module
    • tests.test_config module
    • tests.test_dep_graph module
    • tests.test_dep_policy module
    • tests.test_dep_report module
    • tests.test_dep_sources module
    • tests.test_dev_release module
    • tests.test_docs module
    • tests.test_docstrings module
    • tests.test_forge module
    • tests.test_frontmatter module
    • tests.test_gh module
    • tests.test_git_ops module
    • tests.test_gitignore module
    • tests.test_hashing module
    • tests.test_help module
    • tests.test_http module
    • tests.test_humanize module
    • tests.test_images module
    • tests.test_imports module
    • tests.test_init_project module
    • tests.test_issue module
    • tests.test_job_timings module
    • tests.test_labels module
    • tests.test_lint_repo module
    • tests.test_mailmap module
    • tests.test_matrix module
    • tests.test_metadata module
    • tests.test_metrics module
    • tests.test_npm module
    • tests.test_pages_redirects module
    • tests.test_platform_keys module
    • tests.test_plugin module
    • tests.test_plugin_update_detection module
    • tests.test_pr module
    • tests.test_pr_body module
    • tests.test_prepare_release module
    • tests.test_pypi module
    • tests.test_pyproject module
    • tests.test_readme module
    • tests.test_release_sync module
    • tests.test_releases module
    • tests.test_runner_catalog module
    • tests.test_runner_sync module
    • tests.test_setup_guide module
    • tests.test_skills module
    • tests.test_sphinx_crossrefs module
    • tests.test_status module
    • tests.test_suite_hygiene module
    • tests.test_sync_ops module
    • tests.test_tabular module
    • tests.test_todolist module
    • tests.test_tool_runner module
    • tests.test_unsubscribe module
    • tests.test_uv module
    • tests.test_version_sync module
    • tests.test_versions module
    • tests.test_virustotal module
    • tests.test_vulnerable_deps module
    • tests.test_workflow_sync module
    • tests.test_workflows module
  • Index
  • Module Index

Release and hosting

  • Binaries
  • Cloudflare Pages

Project

  • Changelog
  • Changelog archive
  • History
  • Todo list
  • License
  • GitHub repository
  • Funding
Back to top
View this page
Edit this page

tests.test_broken_links moduleΒΆ

Tests for Sphinx linkcheck parsing, filtering, and report generation.

tests.test_broken_links.test_get_label(repo, expected)[source]ΒΆ

Only a repo whose name starts with awesome- gets the fix-link label.

tests.test_broken_links.test_parse_output_json_empty_file(tmp_path)[source]ΒΆ

Empty file returns no results.

tests.test_broken_links.test_parse_output_json_skips_blank_lines(tmp_path)[source]ΒΆ

Blank lines in the file are skipped.

tests.test_broken_links.test_parse_output_json_single_entry(tmp_path)[source]ΒΆ

Single entry is parsed correctly.

tests.test_broken_links.test_parse_output_json_multiple_entries(tmp_path)[source]ΒΆ

Multiple entries are parsed correctly.

tests.test_broken_links.test_parse_output_json_missing_info_field(tmp_path)[source]ΒΆ

Missing info field defaults to empty string.

tests.test_broken_links.test_filter_by_status(status, expected_count)[source]ΒΆ

Only broken and timeout statuses are kept.

tests.test_broken_links.test_filter_broken_mixed_statuses()[source]ΒΆ

Only broken and timeout are kept from a mixed list.

tests.test_broken_links.test_filter_broken_empty_input()[source]ΒΆ

Empty input returns empty list.

tests.test_broken_links.test_report_empty_list()[source]ΒΆ

Empty list returns empty string.

tests.test_broken_links.test_report_single_broken_link()[source]ΒΆ

Single broken link generates a valid report.

tests.test_broken_links.test_report_groups_by_file_alphabetically()[source]ΒΆ

Results are grouped by filename in alphabetical order.

tests.test_broken_links.test_report_escapes_pipe_chars_in_info()[source]ΒΆ

Pipe characters in info are escaped to avoid breaking tables.

tests.test_broken_links.test_report_source_url_links_filenames_and_lines()[source]ΒΆ

When source_url is provided, filenames and line numbers are linked.

tests.test_broken_links.test_report_no_source_url_plain_text()[source]ΒΆ

Without source_url, filenames and line numbers are plain text.

tests.test_broken_links.test_report_leaves_external_content_unsanitized(info)[source]ΒΆ

The report renderer passes tool output through; the caller sanitizes it.

Splitting the two is what lets the same report be written to a file, where the mention would be inert, or posted to an issue, where it would not. test_lychee_output_sanitized covers the caller’s half.

tests.test_broken_links.test_lychee_output_sanitized(tmp_path)[source]ΒΆ

Lychee markdown output is sanitized before embedding in issue body.

Next
tests.test_cache module
Previous
tests.test_binary module
Copyright © Kevin Deldycke and contributors
Made with Furo
Last updated on 2026-10-13
On this page
  • tests.test_broken_links module
    • test_get_label()
    • test_parse_output_json_empty_file()
    • test_parse_output_json_skips_blank_lines()
    • test_parse_output_json_single_entry()
    • test_parse_output_json_multiple_entries()
    • test_parse_output_json_missing_info_field()
    • test_filter_by_status()
    • test_filter_broken_mixed_statuses()
    • test_filter_broken_empty_input()
    • test_report_empty_list()
    • test_report_single_broken_link()
    • test_report_groups_by_file_alphabetically()
    • test_report_escapes_pipe_chars_in_info()
    • test_report_source_url_links_filenames_and_lines()
    • test_report_no_source_url_plain_text()
    • test_report_leaves_external_content_unsanitized()
    • test_lychee_output_sanitized()