Skip to content

GitHub-issue test parsing + harness (3/4)#103

Open
gaurav wants to merge 2 commits into
split/2-assertionsfrom
split/3-github-issues
Open

GitHub-issue test parsing + harness (3/4)#103
gaurav wants to merge 2 commits into
split/2-assertionsfrom
split/3-github-issues

Conversation

@gaurav

@gaurav gaurav commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Stack 3 of 4 splitting #67. Base: split/2-assertions (PR #102) — review/merge #101 then #102 first.

The original goal of #67: pull BabelTest assertions out of GitHub issues and run them as tests. Two commits:

  1. Parsing (sources/github)GitHubIssueTest / GitHubIssuesTestCases extract assertions from issue bodies (wiki {{BabelTest|...}} markers or fenced YAML), resolve each to an assertions handler, and evaluate against NodeNorm/NameRes. Adds pygithub, pyyaml, tqdm, python-dotenv.
  2. Harness (tests/github_issues) — one pytest per issue (across repos in targets.ini [DEFAULT] Repositories), each assertion a subtest; open-issue failures reported as xfail. Adds --issue to target specific issues, a -m unit PR workflow, and pytest-xdist/pytest-subtests. test_system.py covers parsing/dispatch with mocked GitHub data.

Parsing and harness are combined because the parser's only consumer is the harness; happy to split them if a reviewer prefers.

Verify

  • uv run pytest -m unit -q → 36 passed, 26 deselected, no token, fully offline (mocked test_system.py + assertions docs test).
  • Live: GITHUB_TOKEN=… uv run pytest tests/github_issues --target dev, optionally --issue <org/repo#N>.

🤖 Generated with Claude Code

gaurav and others added 2 commits June 26, 2026 01:02
GitHubIssueTest / GitHubIssuesTestCases pull BabelTest assertions embedded
in GitHub issue bodies (wiki {{BabelTest|...}} markers or fenced YAML
blocks), resolve each to an assertion handler from the assertions package,
and evaluate it against NodeNorm/NameRes. Add the dependencies this needs:
pygithub, pyyaml, tqdm and python-dotenv.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Dynamically generate one pytest per GitHub issue (across the repos listed
in targets.ini [DEFAULT] Repositories), each running the issue's BabelTest
assertions as independent subtests. Open-issue failures are reported as
xfail so they don't block CI. Add a --issue option (and
selected_github_issues fixture) to restrict a run to specific issues, wipe
the issues cache at session start, parallelize with pytest-xdist, and add
a PR workflow that runs the offline `-m unit` suite. tests/github_issues/
test_system.py covers the parsing/dispatch logic with mocked GitHub data.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant