Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
@malcolmt malcolmt authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 tests/regressiontests/queries/models.py
View
12 tests/regressiontests/queries/models.py
@@ -903,12 +903,12 @@ class Join(models.Model):
"""}
-# In Python 2.3, exceptions raised in __len__ are swallowed (Python issue
-# 1242657), so these cases return an empty list, rather than raising an
-# exception. Not a lot we can do about that, unfortunately, due to the way
-# Python handles list() calls internally. Thus, we skip the tests for Python
-# 2.3.
-if sys.version_info >= (2, 4):
+# In Python 2.3 and the Python 2.6 beta releases, exceptions raised in __len__
+# are swallowed (Python issue 1242657), so these cases return an empty list,
+# rather than raising an exception. Not a lot we can do about that,
+# unfortunately, due to the way Python handles list() calls internally. Thus,
+# we skip the tests for Python 2.3 and 2.6.
+if (2, 4) <= sys.version_info < (2, 6):
__test__["API_TESTS"] += """
# If you're not careful, it's possible to introduce infinite loops via default
# ordering on foreign keys in a cycle. We detect that.
Please sign in to comment.
Something went wrong with that request. Please try again.