This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_urllib2 shouldn't use is operator for comparing strings
Type: Stage: resolved
Components: Tests Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: orsenthil Nosy List: SilentGhost, Trundle, eric.araujo, lukasz.langa, orsenthil, pitrou
Priority: normal Keywords: patch

Created on 2011-01-09 16:52 by Trundle, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_urllib2.patch Trundle, 2011-01-09 16:52
test_urllib2.diff SilentGhost, 2011-01-09 18:05
Messages (6)
msg125846 - (view) Author: Andreas Stührk (Trundle) * Date: 2011-01-09 16:52
See the attached patch (applies to 2.7 and 3.2).
msg125848 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2011-01-09 18:00
Shouldn't that be:

self.assertIs(req.type == "ftp", ftp)

?
msg125849 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-01-09 18:17
Actually, this block of tests may be outdated.  Reading the comment above the list of (URIs, is_ftp) doubles makes you see that it was testing the automatic use of FTP in some file: URIs, a very dubious behavior that is now removed or deprecated.  Senthil, I think a little cleanup is needed.
msg125850 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2011-01-09 18:25
Committed for py3k in r87895. Yup, could have been assertIs as well. The reason for the change is that "is" failed on PyPy.

This should be backported to Python 2.7 as well.
msg126132 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2011-01-12 19:36
Committed for 2.7 in r87964, for 3.1 in r87965.
msg126298 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-01-14 20:30
Łukasz, please close issues when they are fixed.
History
Date User Action Args
2022-04-11 14:57:11adminsetgithub: 55083
2011-01-14 20:30:26pitrousetstatus: open -> closed

nosy: + pitrou
messages: + msg126298

resolution: fixed
stage: resolved
2011-01-12 19:36:38SilentGhostsetnosy: orsenthil, eric.araujo, Trundle, SilentGhost, lukasz.langa
messages: + msg126132
2011-01-09 18:25:33lukasz.langasetnosy: orsenthil, eric.araujo, Trundle, SilentGhost, lukasz.langa
messages: + msg125850
2011-01-09 18:17:56eric.araujosetnosy: + eric.araujo, orsenthil
versions: + Python 3.1
messages: + msg125849

assignee: orsenthil
2011-01-09 18:05:44SilentGhostsetfiles: + test_urllib2.diff
2011-01-09 18:00:11SilentGhostsetnosy: + SilentGhost
messages: + msg125848
2011-01-09 16:52:41Trundlecreate