-
Notifications
You must be signed in to change notification settings - Fork 2
Add docstrings to tests #27
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.
I would have expected ImportError. Is there a particular reason ValueError is more appropriate?
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.
It's a peculiarity of implementation, I suppose. Perhaps we should not have this limitation (though I cannot see when we would need a top-level package here.)
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.
Hmm. Thinking about it a bit more, maybe ValueError is appropriate - the function is designed to work only with dotted paths. I think it should have a custom error message though.
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.
ValueErroris appropriate - the function is designed to work only with dotted paths
Indeed.
I think it should have a custom error message though.
👍
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.
|
@ian-foote thank-you for the help |
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.
These tests seem complicated - they were difficult to condense into docstring summaries. Perhaps they can be simplified?
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.
They do. Not very DRY either. Perhaps if they were made dry, then it would look easier to have one assert per test here.
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.
* Split tests for permanent/temporary redirects from test for the redirect's target url * Simplify integration test to focus on integration * Remove essentially duplicate integration test * Add docstrings
|
@meshy Review? |
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.
I think this refactor is an improvement, but if you disagree or think it shouldn't be in this pull-request I can easily remove it.
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.
I think this refactor is an improvement
So do I, thanks :)
|
👍 Thank-you very much! This may be a hard standard to keep up, but I hope we can do it! |
No description provided.