Skip to content

Improve test coverage of __main__.py#1965

Merged
apeltzer merged 16 commits into
nf-core:devfrom
Aratz:coverage_main
Oct 27, 2022
Merged

Improve test coverage of __main__.py#1965
apeltzer merged 16 commits into
nf-core:devfrom
Aratz:coverage_main

Conversation

@Aratz

@Aratz Aratz commented Oct 24, 2022

Copy link
Copy Markdown
Contributor

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

@mashehu mashehu left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread tests/test_cli.py
Comment thread tests/test_cli.py
Comment thread tests/test_cli.py
@mashehu mashehu requested a review from fabianegli October 25, 2022 07:45
@codecov

codecov Bot commented Oct 25, 2022

Copy link
Copy Markdown

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.

Comment thread tests/test_cli.py Outdated
Comment thread tests/test_cli.py Outdated
@Aratz

Aratz commented Oct 27, 2022

Copy link
Copy Markdown
Contributor Author

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

@Aratz Aratz requested review from fabianegli and mashehu October 27, 2022 11:23
Comment thread nf_core/__main__.py Outdated
Comment thread nf_core/__main__.py Outdated
Comment thread nf_core/__main__.py Outdated
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>

@fabianegli fabianegli left a comment

Copy link
Copy Markdown
Contributor

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