-
Notifications
You must be signed in to change notification settings - Fork 134
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
[issue-394] add tests for tag_value writer #567
[issue-394] add tests for tag_value writer #567
Conversation
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 for the effort, much appreciated! :)
However, I think it would be in our best interest to replace all of the value strings with references to the fixture values, at least where possible.
For example, "FileName: ./fileName.py\n"
would become f"FileName: {file_fixture().name}\n"
You are absolutely right, I replaced most strings. I didn't replace date strings and other strings that have a bit more logic than just a reference to the fixture value, please have another look. |
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, no big issues from my side!
|
||
mock.assert_called_once_with("foo", "w") | ||
handle = mock() | ||
handle.write.assert_has_calls( |
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 method allows other calls before or after the given list of calls. I haven't found a way to check that there are no such calls but maybe this isn't too important to check right now, anyway.
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.
Yes, another option would be assert_has_calls
but this wouldn't check the order of calls, which is more important I think than the "risk" of calls before or after this statement.
Signed-off-by: Meret Behrens <[email protected]>
3cf8389
to
a662853
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.
Thanks! :)
fixes #394