Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #13362 -- Disabled the test for bug #8245 under Python 2.3 due …

…to differences in exception handling.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit d2fec79d7bbe6eae337107969b836a1a0b14b89b 1 parent d9a0fd4
Russell Keith-Magee authored April 24, 2010

Showing 1 changed file with 22 additions and 19 deletions. Show diff stats Hide diff stats

  1. 41  tests/regressiontests/bug8245/tests.py
41  tests/regressiontests/bug8245/tests.py
... ...
@@ -1,3 +1,4 @@
  1
+import sys
1 2
 from unittest import TestCase
2 3
 
3 4
 from django.contrib import admin
@@ -8,23 +9,25 @@ class Bug8245Test(TestCase):
8 9
     Test for bug #8245 - don't raise an AlreadyRegistered exception when using
9 10
     autodiscover() and an admin.py module contains an error.
10 11
     """
  12
+    if sys.version_info[1] >= 4:
  13
+        # Due to a bug in Python 2.3, this test will fail. The actual
  14
+        # feature works fine; it's just a testing problem. See #13362 for details.
  15
+        def test_bug_8245(self):
  16
+            # The first time autodiscover is called, we should get our real error.
  17
+            try:
  18
+                admin.autodiscover()
  19
+            except Exception, e:
  20
+                self.failUnlessEqual(str(e), "Bad admin module")
  21
+            else:
  22
+                self.fail(
  23
+                    'autodiscover should have raised a "Bad admin module" error.')
11 24
 
12  
-    def test_bug_8245(self):
13  
-        # The first time autodiscover is called, we should get our real error.
14  
-        try:
15  
-            admin.autodiscover()
16  
-        except Exception, e:
17  
-            self.failUnlessEqual(str(e), "Bad admin module")
18  
-        else:
19  
-            self.fail(
20  
-                'autodiscover should have raised a "Bad admin module" error.')
21  
-
22  
-        # Calling autodiscover again should raise the very same error it did
23  
-        # the first time, not an AlreadyRegistered error.
24  
-        try:
25  
-            admin.autodiscover()
26  
-        except Exception, e:
27  
-            self.failUnlessEqual(str(e), "Bad admin module")
28  
-        else:
29  
-            self.fail( 
30  
-                'autodiscover should have raised a "Bad admin module" error.')
  25
+            # Calling autodiscover again should raise the very same error it did
  26
+            # the first time, not an AlreadyRegistered error.
  27
+            try:
  28
+                admin.autodiscover()
  29
+            except Exception, e:
  30
+                self.failUnlessEqual(str(e), "Bad admin module")
  31
+            else:
  32
+                self.fail(
  33
+                    'autodiscover should have raised a "Bad admin module" error.')

0 notes on commit d2fec79

Please sign in to comment.
Something went wrong with that request. Please try again.