-
-
Notifications
You must be signed in to change notification settings - Fork 227
fix issue #103 - reorder version dumping #104
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
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, but i'm wondering if the test suite would find a similar regression in the future.
|
||
|
||
def dump_version(root, version, write_to, template=None): | ||
assert isinstance(version, string_types) |
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.
does this detect the new failure?
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.
the code in dump-version only works with strings, perhaps even this check is not trough enough
local_scheme=local_scheme) | ||
return version | ||
|
||
return version_string |
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 like this: much clearer than the previous implementation - i thought of doing something like that in my own PR but refrained to keep things simple...
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 did a more intensive restructure ensuring i never get a string there - the shortcut was an premature optimization, and as such the root of the evil ^^
def test_dump_version_doesnt_bail_on_value_error(tmpdir): | ||
write_to = "VERSION" | ||
version = VERSIONS['exact'] | ||
version = str(VERSIONS['exact'].tag) |
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 sure what isthis for - would this silence possible unit test failures that could detect the fixed bug?
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.
exact.tag is a setultools version not a string
@anarcat @untitaker unless you have further comments i'm about to release 1.13 |
lgtm |
No description provided.