Skip to content

Add GitHub issue tests with per test reporting#71

Closed
gaurav wants to merge 2 commits into
add-github-issue-testsfrom
add-github-issue-tests-with-per-test-reporting
Closed

Add GitHub issue tests with per test reporting#71
gaurav wants to merge 2 commits into
add-github-issue-testsfrom
add-github-issue-tests-with-per-test-reporting

Conversation

@gaurav
Copy link
Copy Markdown
Collaborator

@gaurav gaurav commented Feb 19, 2026

This is a version of PR #67 that uses per-test reporting, i.e. each GitHub issue will appear as a single test result.

I think doing this with subtests will be better.

WIP

gaurav and others added 2 commits February 19, 2026 17:39
Each BabelTest assertion now gets its own pytest test entry, so individual
assertion failures are reported separately instead of being collapsed into
a single per-issue result. Achieved by:

- Adding `repo_id` to `GitHubIssueTest` so `__str__` no longer triggers
  lazy PyGitHub API calls to resolve org/repo name.
- Adding `repo_id` param to `get_test_issues_from_issue()` and threading
  it through to every `GitHubIssueTest` constructor.
- Adding `GitHubIssuesTestCases.get_all_test_issues()` which returns a
  flat `list[pytest.param]`, one per assertion (issues with no BabelTest
  syntax are silently skipped).
- Rewriting `test_github_issues.py` to parametrize over `GitHubIssueTest`
  objects via `get_all_test_issues()`, eliminating the inner loop that
  hid individual failures. The `--issue` filter is updated to use the
  stored `repo_id` field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…I endpoint.

Moves parametrization into a pytest_generate_tests hook in a new
tests/github_issues/conftest.py. When --issue is provided, calls the new
get_specific_test_issues() method which uses the single-issue REST endpoint
(1–4 API calls) instead of paginating through all issues. Full runs are
unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gaurav gaurav changed the base branch from main to add-github-issue-tests February 19, 2026 23:35
@gaurav
Copy link
Copy Markdown
Collaborator Author

gaurav commented Apr 23, 2026

PR #67 figured this out. Closing.

@gaurav gaurav closed this Apr 23, 2026
@gaurav gaurav deleted the add-github-issue-tests-with-per-test-reporting branch April 23, 2026 20:20
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