Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Hid a few QuerySet regression tests from Python 2.6 due to a bug in t…

…he the

Python beta releases. Failures there mean that incorrect code won't raise an
error, but it's otherwise harmless (correct code still runs correctly).

Fixed #7786.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8570 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 15ed5e61c959d1d6e290b566653e81adc9f3b930 1 parent 948a833
Malcolm Tredinnick authored August 26, 2008

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

  1. 12  tests/regressiontests/queries/models.py
12  tests/regressiontests/queries/models.py
@@ -903,12 +903,12 @@ class Join(models.Model):
903 903
 
904 904
 """}
905 905
 
906  
-# In Python 2.3, exceptions raised in __len__ are swallowed (Python issue
907  
-# 1242657), so these cases return an empty list, rather than raising an
908  
-# exception. Not a lot we can do about that, unfortunately, due to the way
909  
-# Python handles list() calls internally. Thus, we skip the tests for Python
910  
-# 2.3.
911  
-if sys.version_info >= (2, 4):
  906
+# In Python 2.3 and the Python 2.6 beta releases, exceptions raised in __len__
  907
+# are swallowed (Python issue 1242657), so these cases return an empty list,
  908
+# rather than raising an exception. Not a lot we can do about that,
  909
+# unfortunately, due to the way Python handles list() calls internally. Thus,
  910
+# we skip the tests for Python 2.3 and 2.6.
  911
+if (2, 4) <= sys.version_info < (2, 6):
912 912
     __test__["API_TESTS"] += """
913 913
 # If you're not careful, it's possible to introduce infinite loops via default
914 914
 # ordering on foreign keys in a cycle. We detect that.

0 notes on commit 15ed5e6

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