-
Notifications
You must be signed in to change notification settings - Fork 62
Adds 'popper scaffold' test #807
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #807 +/- ##
==========================================
+ Coverage 92.00% 92.48% +0.48%
==========================================
Files 20 23 +3
Lines 1751 1837 +86
==========================================
+ Hits 1611 1699 +88
+ Misses 140 138 -2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @vipulchhabra99 ! Please take a look at the comments
cli/test/test_scaffold.py
Outdated
|
||
repo = self.mk_repo() | ||
runner = CliRunner() | ||
file_loc = repo.working_dir+'/wf.yml' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mk_repo
creates a git repo. In this case, we don't really need one, so we can instead use tempfile
:
wf_dir = tempfile.mkdtemp()
file_loc = f'{wf_dir}/wf.yml'
BTW, we can use f-strings here as well as shown above, in order to keep it consistent with the rest of the codebase
cli/test/test_scaffold.py
Outdated
result = runner.invoke(run.cli, ['-f', file_loc]) | ||
self.assertEqual(result.exit_code, 0) | ||
|
||
self.assertTrue(len(test_logger.output)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be indented within the with
statement, as the test_logger
variable is only valid in this scope
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can also inspect the content of the output to ensure that it ran as it should
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I inspect the number of steps it ran because the other output is very lengthy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that works fine. we only need to solve the pep8 issues that might arise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
Hello @vipulchhabra99! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-04-20 04:46:06 UTC |
thanks a lot @vipulchhabra99 ! |
The popper scaffold test has been updated using click unit testing.