Skip to content

Fix incorrect assertions for called_with on mocks#2891

Merged
mashehu merged 12 commits into
nf-core:devfrom
awgymer:2890-fix-ci-3-12
Mar 27, 2024
Merged

Fix incorrect assertions for called_with on mocks#2891
mashehu merged 12 commits into
nf-core:devfrom
awgymer:2890-fix-ci-3-12

Conversation

@awgymer

@awgymer awgymer commented Mar 20, 2024

Copy link
Copy Markdown
Contributor

Closes #2890

fix: assertions for called_with/called_once_with were silently returning mocks before 3.12. Broken in 3.12.

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

@awgymer

awgymer commented Mar 20, 2024

Copy link
Copy Markdown
Contributor Author

We need to resolve the issue with the patch on the schema lint tests.

I cannot for the life of me figure out what the correct way to patch the method call of the pipeline Schema object is. I think perhaps there is an issue with the fact the class is imported inside the cli function?

@mashehu mashehu mentioned this pull request Mar 21, 2024
4 tasks
Comment thread tests/test_cli.py Outdated
@codecov

codecov Bot commented Mar 26, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 88.88889% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 74.97%. Comparing base (221b683) to head (3fa8131).
Report is 4 commits behind head on dev.

Files Patch % Lines
nf_core/components/components_command.py 0.00% 1 Missing ⚠️
Additional details and impacted files

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

Comment thread nf_core/schema.py Outdated
Comment thread nf_core/schema.py Outdated
@awgymer

awgymer commented Mar 27, 2024

Copy link
Copy Markdown
Contributor Author

So is this good to merge now? It will make a lot of other PRs stop failing!

@mashehu

mashehu commented Mar 27, 2024

Copy link
Copy Markdown
Contributor

I guess so😄

@mashehu mashehu merged commit 0b1dcf2 into nf-core:dev Mar 27, 2024
@awgymer awgymer deleted the 2890-fix-ci-3-12 branch March 28, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants