Skip to content

tests/test_peterhinch_page.py is never collected by the unittest gate — 16 bare functions only ran under pytest #119

Description

@bdbarnett

Found while fixing #117 (commit 21939628), not fixed there because #117 did not name it.

tests/test_peterhinch_page.py defines 16 module-level test_* functions and no unittest.TestCase. The documented gate and CI both run python -m unittest discover -s tests, which collects zero of them:

$ .venv/bin/python -m unittest tests.test_peterhinch_page -v
Ran 0 tests in 0.000s
NO TESTS RAN

So the acf87b7a fix that this file covers has only ever been exercised under pytest, never under the gate that CI actually runs. Same blindness test_gallery_frame.py had until 21939628 wrapped it (that raised the gate's enforced count 24 → 43).

Fix: wrap the 16 functions in a unittest.TestCase (or convert to methods) exactly as 21939628 did, then confirm unittest discover collects 16 more and they pass. Also worth a one-line check across tests/ for any other bare-function modules — a test file the gate cannot see is the pattern of the day: a checker that reports success while measuring nothing.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions