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

Improve test coverage of __main__.py #1965

Merged
merged 16 commits into from
Oct 27, 2022
Merged

Conversation

Aratz
Copy link
Contributor

@Aratz Aratz commented Oct 24, 2022

This PR adds unit test for the following commands: list, launch, download, create and lint.

The code of these commands is quite simple so what the tests do is mostly check that no cli arguments are forgotten and that they are passed along to the correct function.

Related to #1937

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!

@Aratz Aratz self-assigned this Oct 24, 2022
Copy link
Contributor

@mashehu mashehu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a quick look at it.

tests/test_cli.py Show resolved Hide resolved
tests/test_cli.py Show resolved Hide resolved
tests/test_cli.py Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 25, 2022

Codecov Report

Merging #1965 (b76d3cd) into dev (e63bde1) will increase coverage by 0.72%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##              dev    #1965      +/-   ##
==========================================
+ Coverage   61.13%   61.86%   +0.72%     
==========================================
  Files          37       37              
  Lines        4678     4678              
==========================================
+ Hits         2860     2894      +34     
+ Misses       1818     1784      -34     
Impacted Files Coverage Δ
nf_core/__main__.py 60.00% <ø> (+6.60%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

tests/test_cli.py Outdated Show resolved Hide resolved
tests/test_cli.py Outdated Show resolved Hide resolved
@Aratz
Copy link
Contributor Author

Aratz commented Oct 27, 2022

Thanks for the comments, I think you can take another look now

nf_core/__main__.py Outdated Show resolved Hide resolved
nf_core/__main__.py Outdated Show resolved Hide resolved
nf_core/__main__.py Outdated Show resolved Hide resolved
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
Copy link
Contributor

@fabianegli fabianegli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@apeltzer apeltzer merged commit 890b5c7 into nf-core:dev Oct 27, 2022
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