Skip to content

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Feb 24, 2025

Closes #1408.

Changes proposed in this pull request

  • Enable doctests in unit test CircleCI job.
  • Fix doctests that are failing.

@tsalo tsalo added the testing Improving testing in the project. label Feb 24, 2025
Copy link

codecov bot commented Feb 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.07%. Comparing base (3321d2f) to head (6f65dbe).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1410   +/-   ##
=======================================
  Coverage   79.06%   79.07%           
=======================================
  Files          58       58           
  Lines        7347     7349    +2     
  Branches      970      970           
=======================================
+ Hits         5809     5811    +2     
  Misses       1256     1256           
  Partials      282      282           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tsalo
Copy link
Member Author

tsalo commented Feb 24, 2025

Enabling the doctests causes the following unit tests to fail:

FAILED xcp_d/tests/test_utils_bids.py::test_collect_participants - Failed: DID NOT WARN. No warnings of type (<class 'xcp_d.utils.bids.BIDSWarning'>,) were emitted.
 Emitted warnings: [].
FAILED xcp_d/tests/test_utils_confounds.py::test_modify_motion_filter - Failed: DID NOT WARN. No warnings of type (<class 'Warning'>,) were emitted.
 Emitted warnings: [].

These are the only tests that use pytest.warns, so I think the doctests must be filtering out warnings.

@tsalo
Copy link
Member Author

tsalo commented Aug 5, 2025

The easiest solution might be to add a separate node in the CircleCI workflow that only runs the doctests.

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

Labels

testing Improving testing in the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run doctests

1 participant