Skip to content

Enforce the existing 100% coverage of scs/py/__init__.py in CI #238

Description

@tschm

Subcategory: test coverage & depth
Current → target: 8 → 10

Problem

The Python layer is fully covered, but nothing in CI measures it, so a regression would be
invisible.

Measured locally (run from outside the repo so the source mapped to the installed module):

Name                                    Stmts   Miss  Cover
----------------------------------------------------------
site-packages/scs/__init__.py             114      0   100%
----------------------------------------------------------
TOTAL                                     114      0   100%
396 passed, 67 skipped

But grep -n "coverage\|--cov" .github/workflows/*.yml pyproject.toml returns nothing:
no workflow installs pytest-cov, passes --cov, or enforces a threshold. The value is
100% today by accident of discipline, not by enforcement.

Files / config to change

  • add pytest-cov to the test job's dependency list in .github/workflows/build.yml
    (or freethreading_tests.yml, whichever is the canonical test job)
  • run pytest --cov=scs --cov-report=term-missing --cov-fail-under=100

Note: this measures the Python layer only. The ~1,300-line C wrapper in scs/scsobject.h
has no coverage measurement; that is out of scope for this issue.

Done when

At least one CI job enforces a coverage threshold on scs/py/__init__.py, and dropping a
line of its coverage fails a pull request.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions