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

Unexpected compare behaviour #73

Closed
hellysmile opened this issue Apr 13, 2017 · 4 comments
Closed

Unexpected compare behaviour #73

hellysmile opened this issue Apr 13, 2017 · 4 comments

Comments

@hellysmile
Copy link
Member

from yarl import  URL
URL('http://test.com/') == URL('http://test.com')
False

It should be True

@AraHaan
Copy link
Contributor

AraHaan commented Apr 14, 2017

It is because of the missing slash on the end.

@hellysmile
Copy link
Member Author

hellysmile commented Apr 14, 2017

from yarl import  URL

url1 = URL('http://test.com/')
url2 = URL('http://test.com')

url1.path
'/'

url2.path
'/'

url1.path == url2.path
True

@AraHaan
Copy link
Contributor

AraHaan commented Apr 14, 2017

This is what I got:

Python 3.6.0rc1 (v3.6.0rc1:29a273eee9a5, Dec  7 2016, 04:31:34) [MSC v.1900 32 b
it (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from yarl import URL
>>> URL('http://test.com/') == URL('http://test.com')
False
>>> URL('http://test.com/')
URL('http://test.com/')
>>> URL('http://test.com/') == URL('http://test.com')
False
>>> URL('http://test.com/')
URL('http://test.com/')
>>> URL('http://test.com')
URL('http://test.com')
>>>

fafhrd91 added a commit that referenced this issue May 3, 2017
@fafhrd91
Copy link
Member

fafhrd91 commented May 3, 2017

should be fixed

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

No branches or pull requests

3 participants