Skip to content

Test github.collect's drop rules, unreadable coverage and run mapping (see #86) #88

Closed as not planned

Description

@tschm

rhiza

Subcategory: Test coverage & depth 9 → 10. Fixed by open PR #86. Close this when #86 merges.

On main, coverage reports 100%, yet three behaviours of collector/jq_collector/github.py collect are never run by any test. Each is one clause of a multi-line expression, and coverage marks the whole expression covered once its first line runs:

  • The drop rules: archived (unless JQ_INCLUDE_ARCHIVED), JQ_IGNORE by full name or bare name, and JQ_PUBLIC_ONLY against private repos. GitLab's equivalents are tested in test_gitlab.py; GitHub's are not.
  • A coverage artifact whose report can't be read (coverage_percent returns None). It should give no coverage figure (not 0) and keep the artifact id.
  • Turning runs into WorkflowRuns: name fallbacks, durations, negative clock skew clamped to 0, and the older failure shown over a newer success.

Every StubAPI in the tests returns latest_runs() == [] and a single public, unarchived repo, so none of these paths ever runs.

Done when: a test exercises each of the three through github.collect, with the 100% floor intact. #86 adds those tests to test_github_http.py.

Activity

  1. tschm commented on Oct 8, 2026

    @tschm
    MemberAuthor

    Closed at the maintainer's request as tracked elsewhere: the fix is in open PR #86 (for #82), not yet merged. If #86 is closed without merging, reopen this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions