Skip to content

download-test.yml collects no tests, so every @pytest.mark.download test runs in no CI job #1162

Closed

Description

@bruAristimunha

What

.github/workflows/download-test.yml is the only workflow that passes --dl-data, and it collects nothing — so every @pytest.mark.download test runs in no CI job at all.

# .github/workflows/download-test.yml:41-42
cd moabb/tests
pytest -vv -s --tb=long --durations=0 --maxfail=5 --log-cli-level=INFO --dl-data download.py

moabb/tests/download.py does not exist. The file is moabb/tests/test_download.py. pytest exits 5 ("no tests collected"), and since it is the last command in the step the job can pass while testing nothing.

moabb/tests/conftest.py skips download-marked tests unless --dl-data is given, and .github/workflows/test.yml never passes it — so the marker currently gates those tests out of CI entirely.

Why it matters

This is not hypothetical. test_metadata_matches_raw_data (moabb/tests/test_datasets.py) asserts per-channel-type counts against each dataset's METADATA, for every catalogued dataset. It would have caught the BNCI2025_001 label leak fixed in #1161 — the metadata declared 67 EEG channels against a 60-electrode montage, and the 7 kinematic channels (target position, hand velocity) were typed eeg and fed to classifiers as features.

That invariant exists, is correct, and has never executed.

Suggested fix

-          cd moabb/tests
-          pytest ... --dl-data download.py
+          pytest ... --dl-data moabb/tests/test_download.py

Worth considering separately:

  • run the metadata invariants (which need no downloads beyond a first fetch) more often than monthly
  • make the job fail loudly on an empty collection, e.g. --strict-markers plus an explicit exit-code check, so a path typo cannot look like a pass again

Verification

$ ls moabb/tests/download.py
ls: moabb/tests/download.py: No such file or directory

$ grep -rn "dl-data" .github/workflows/
.github/workflows/download-test.yml:42:  pytest ... --dl-data download.py

Activity

  1. bruAristimunha commented on Aug 26, 2026

    @bruAristimunha
    CollaboratorAuthor

    Correction to the issue body: I wrote that the job "can pass while testing nothing". That is wrong, and I should have checked before filing.

    pytest exits 4 on a missing file (5 on an empty collection), and the step has no || true or continue-on-error — so it fails. The run history confirms it has been failing every month, unbroken:

    failure  2026-08-01  Download-Test
    failure  2026-07-01  Download-Test
    failure  2026-06-01  Download-Test
    failure  2026-05-01  Download-Test
    failure  2026-04-01  Download-Test
    failure  2026-03-01  Download-Test
    

    So this is a red monthly job nobody is watching, not a green one hiding an empty run. The consequence for coverage is identical — no @pytest.mark.download test has executed — but the fix is even simpler than I suggested: no need for an empty-collection guard, just correct the path.

    -          cd moabb/tests
    -          pytest ... --dl-data download.py
    +          pytest ... --dl-data moabb/tests/test_download.py

    Worth deciding separately whether a monthly job that has been red since at least March should notify someone.

  2. bruAristimunha commented on Aug 26, 2026

    @bruAristimunha
    CollaboratorAuthor

    Fixed in #1161 (7c10845).

  3. bruAristimunha commented on Aug 26, 2026

    @bruAristimunha
    CollaboratorAuthor

    Fixed in #1161 (eb8e59d).

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