Skip to content

tests/project/test_isort_clean.py skips on every CI leg, invisibly to the dependency-gate guard #766

Description

@JarryShaw

Describe the bug

tests/project/test_isort_clean.py (added in #761) skips on every CI leg, and does it in a
form tests/_dependency_gates.py cannot see — so it is the third instance of exactly the failure
mode #745 was built to stop.

Reproduction

unit-tests.yml is the only workflow running pytest. Its three install lines are
.[test,DPKT,crypto,NGAP], .[test,Scapy,DPKT,cli] and .[test,Scapy,DPKT,crypto,cli,NGAP];
isort is in none of them and is absent from the test extra, from Pipfile's [dev-packages],
and from pyproject.toml entirely. With isort blocked at import:

setUpClass (tests.project.test_isort_clean.TestIsortIsCleanOnThePackage) ... skipped
Ran 0 tests in 0.000s
OK (skipped=1)

The regression it exists to catch passes green.

Expected behavior

Either the test runs on at least one CI leg, or its gate is visible to the dependency-gate
machinery and explicitly excluded with a stated reason.

Additional context

The guard reads unittest.skipUnless decorators; this raises SkipTest inside setUpClass, so
flag_requirements() never sees it — tests/test_tier_guard.py is 84 passed / 485 subtests green
with the hole open. The cited precedent is not equivalent: TestYAMLAgreesWithTheScanner skips
with a stated fallback, so something always runs. Here nothing does.

Blocked on #755, which owns tests/test_tier_guard.py and .github/workflows/unit-tests.yml.
Adding a visible HAS_ISORT gate would correctly turn the guard red until isort is on an install
line, so both files have to move together. Found in the cross-review of #761.

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

    bugtestPull requests that add or correct tests (test: subject prefix)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions