#9585: r9398 broke test suite on Python2.3/2.4
-------------------------------+--------------------------------------------
 Reporter:  kmtracey           |       Owner:  nobody    
   Status:  new                |   Milestone:            
Component:  Testing framework  |     Version:  1.0       
 Keywords:                     |       Stage:  Unreviewed
Has_patch:  0                  |  
-------------------------------+--------------------------------------------
 r9398 added code to the test suite that uses `.path` on the result of
 urlparse.urlparse.  It works something like this:

 {{{
 Python 2.5.1 (r251:54863, Jul 31 2008, 23:17:40)
 [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> from urlparse import urlparse
 >>> parsed =
 
urlparse("http://docs.python.org/search.html?q=urlparse&check_keywords=yes&area=default";)
 >>> type(parsed)
 <class 'urlparse.ParseResult'>
 >>> parsed.path
 '/search.html'
 >>>
 }}}

 Unfortunately prior to Python 2.5 (?) the return value from
 urlparse.urlparse was a simple tuple, not a `urlparse.ParseResult`, so the
 test usage of `.path` on the return value of `urlparse` causes errors:

 {{{
 Python 2.4.4 (#2, Jul 31 2008, 23:57:57)
 [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> from urlparse import urlparse
 >>> parsed =
 
urlparse("http://docs.python.org/search.html?q=urlparse&check_keywords=yes&area=default";)
 >>> type(parsed)
 <type 'tuple'>
 >>> parsed.path
 Traceback (most recent call last):
   File "<stdin>", line 1, in ?
 AttributeError: 'tuple' object has no attribute 'path'
 >>>
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9585>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to