-
Notifications
You must be signed in to change notification settings - Fork 122
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
Refactored test_build.py #565
Conversation
a7820ac
to
875df57
Compare
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.
Looks good. Only minor comments. Much appreciated.
I did a quick review between a meeting and a windows server core image build :)
f.write("**Blah blah**") | ||
|
||
result = runner.invoke(command, ["--draft", "--date", "01-01-2001"]) | ||
@with_project() |
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.
happy to see the reduction in code indentation/nesting :)
@@ -157,7 +152,12 @@ def test_in_different_dir_config_option(self, runner): | |||
self.assertEqual(0, result.exit_code) | |||
self.assertTrue((project_dir / "NEWS.rst").exists()) | |||
|
|||
@with_isolated_runner | |||
@with_project( |
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 is so much easier to read. thanks a lot!
""" | ||
foo 7.8.9 (01-01-2001) | ||
====================== | ||
dedent( |
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.
just asking. Was this change needed? was the test failing with the old code?
For assertion, I prefer to have as little processing as possible.
But we can also have this code... no problem.
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.
Not specifically needed. But this way it aligns better with the other tests doing assertions the same way.
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.
Ok. We can merge this. No problem.
Made use of more generic with_[git_]project decorators. Co-authored-by: Adi Roiban <[email protected]>
dabcb3e
to
3cddf1d
Compare
for more information, see https://pre-commit.ci
It looks good. I don't have time to look into the details... but I think that we are fine. |
Made use of more generic with_[git_]project decorators.
Description
Checklist
src/towncrier/newsfragments/
. Describe yourchange and include important information. Your change will be included in the public release notes.
docs/tutorial.rst
is still up-to-date.docs/cli.rst
reflects those changes.docs/configuration.rst
reflects those changes.