Hid a few QuerySet regression tests from Python 2.6 due to a bug in the 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
This commit is contained in:
Malcolm Tredinnick 2008-08-26 03:22:44 +00:00
parent 948a833eb7
commit 15ed5e61c9
1 changed files with 6 additions and 6 deletions

View File

@ -903,12 +903,12 @@ Pickling of DateQuerySets used to fail
"""}
# 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.