Skip to content
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

1026907 - Fix dep equality comparison when a release is omitted. #377

Merged
merged 2 commits into from Nov 7, 2013

Conversation

jdob
Copy link
Contributor

@jdob jdob commented Nov 7, 2013

@@ -318,16 +318,26 @@ def test___eq___true(self):
"""
Test the __eq__ method with equal Requirements.
"""
r_1 = depsolve.Requirement('test', 0, '1.0.01')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This got me thinking. I think this was the only test we had that ensured, somewhat indirectly, that "x.01" == "x.1". That also made me realize that this PR has changed that behavior, so that they are no longer equal, where before they were. Perhaps we should serialize the versions before doing the equality comparison? In any case, there should be a test that ensures the correct behavior when a leading zero is involved.

$ rpmdev-vercmp
  Epoch1: 
Version1: 1.2.3
Release1: 
  Epoch2: 
Version2: 1.2.03
Release2: 
1.2.3 == 1.2.03

@mhrivnak
Copy link
Contributor

mhrivnak commented Nov 7, 2013

LGTM

jdob pushed a commit that referenced this pull request Nov 7, 2013
1026907 - Fix dep equality comparison when a release is omitted.
@jdob jdob merged commit 118ca5a into pulp-2.2 Nov 7, 2013
@jdob jdob deleted the jdob-1026907 branch November 7, 2013 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants