Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

scripts/check_broken_links.py has no tests (0% coverage)

Open Beginner friendly
#1,109 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
testing

Research direction

Read scripts/check_broken_links.py and compare its structure with the other script tests. Create tests/test_check_broken_links.py using temporary directory trees to cover link resolution, ignored links, and the reported exit code and message format. Done means tests catch broken-link regressions and provide at least 85% line coverage for the script.

Written by the indexing model from the issue text.

Description

enhancement good first issue

Where: scripts/check_broken_links.py, a new tests/test_check_broken_links.py.

Current gap: running the fast suite with --cov=scripts reports 0% for scripts/check_broken_links.py (106 statements): no test file imports it, although it runs in make lint, the lint workflow and the pre-commit hook, and has already needed fixes (a misspelled folder and a ../ bug in the explainer link resolver). A regression in it could silently stop catching broken links.

Repro: python3 -m pytest tests -q -m "not slow" --cov=scripts --cov-report=term | grep check_broken_links

Suggested approach: write tests against a temporary directory tree: a relative link that resolves, one that does not, a link with an anchor, a link to a directory, an external URL (ignored), a link inside a fenced code block (ignored if that is the intent), and the exit code and message format. Load the script with importlib.import_module("scripts.check_broken_links"), as the other script tests do.

Done when: the module has at least 85% line coverage from tests that fail if the script stops reporting a broken link.

Dominant language
HTML
Stars
47
Forks
45
Avg merge
3h 10m
Merged PRs (30d)
78

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from yakew7/Fair-Code

All issues in yakew7/Fair-Code

Similar issues

More Testing & QA issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.