Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable doctests #1410

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Enable doctests #1410

wants to merge 7 commits into from

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.

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