#13362: bug8245 test fails on 1.1.X/Python2.3 after r12957
----------------------------------+-----------------------------------------
 Reporter:  kmtracey              |       Owner:  nobody    
   Status:  new                   |   Milestone:  1.2       
Component:  django.contrib.admin  |     Version:  SVN       
 Keywords:                        |       Stage:  Unreviewed
Has_patch:  0                     |  
----------------------------------+-----------------------------------------
 The fix for #11957 doesn't appear to work on Python2.3:

 {{{
 test_bug_8245 (regressiontests.bug8245.tests.Bug8245Test) ... FAIL

 ======================================================================
 FAIL: test_bug_8245 (regressiontests.bug8245.tests.Bug8245Test)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 "C:\u\kmt\django\branch1.1.X\tests\regressiontests\bug8245\tests.py", line
 29, in test_bug_8245
     self.fail(
   File "C:\bin\Python23\lib\unittest.py", line 270, in fail
     raise self.failureException, msg
 AssertionError: autodiscover should have raised a "Bad admin module"
 error.

 ----------------------------------------------------------------------
 Ran 1 test in 0.094s

 FAILED (failures=1)
 }}}

 This test app has a broken admin module: attempting to import it raises an
 exception.  Thus `admin.autodiscover()` raises an exception. Prior to
 r12957, the autodiscover code prevented a 2nd attempt to load admin
 modules if a first attempt failed to complete successfully, so the
 expected behavior was that a 2nd attempt to run autodiscover() would not
 raise an exception even though the first one did. r12957 changed things so
 that the loads will be re-attempted, and now the expected behavior is that
 the 2 successive calls to autodiscover() will raise the same exception.

 However, on Python 2.3, the 2nd call to `__import__` the broken admin
 module doesn't, in fact, raise an exception. This looks to me like a
 Python problem and my initial inclination is therefore to just skip this
 test if we are running on Python 2.3. (Perhaps there is some way to force
 Python2.3 to raise the exception again, but I'm not inclined to spend the
 investigation time required to figure that out for sure one way or the
 other.)

 I'd be interested in others' opinions on how to deal with this.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13362>
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 django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to