﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24827	assertRaisesMessage() fails with Python 2.7.10~rc1	Raphaël Hertzog	nobody	"Currently Debian Unstable has Python 2.7.10~rc1 and the Django test suite is falling apart since all calls to assertRaisesMessage() fail. All those errrors are gone when I run the test in Debian 8 Jessie with Python 2.7.9.

I'm not sure if it's a Python bug or a Django bug.

Here are two examples of failures in the test suite:

{{{
======================================================================
ERROR: test_avoid_infinite_loop_on_too_many_subqueries (queries.tests.Queries1Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/«PKGBUILDDIR»/tests/queries/tests.py"", line 393, in test_avoid_infinite_loop_on_too_many_subquer
ies
    with self.assertRaisesMessage(RuntimeError, msg):
  File ""/«PKGBUILDDIR»/django/test/testcases.py"", line 582, in assertRaisesMessage
    re.escape(expected_message), callable_obj, *args, **kwargs)
  File ""/«PKGBUILDDIR»/django/utils/six.py"", line 643, in assertRaisesRegex
    return getattr(self, _assertRaisesRegex)(*args, **kwargs)
  File ""/usr/lib/python2.7/unittest/case.py"", line 995, in assertRaisesRegexp
    callable_obj(*args, **kwargs)
TypeError: 'NoneType' object is not callable

======================================================================
FAIL: test_recipients_as_string (mail.tests.MailTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/«PKGBUILDDIR»/tests/mail/tests.py"", line 115, in test_recipients_as_string
    with self.assertRaisesMessage(TypeError, '""to"" argument must be a list or tuple'):
  File ""/«PKGBUILDDIR»/django/test/testcases.py"", line 582, in assertRaisesMessage
    re.escape(expected_message), callable_obj, *args, **kwargs)
  File ""/«PKGBUILDDIR»/django/utils/six.py"", line 643, in assertRaisesRegex
    return getattr(self, _assertRaisesRegex)(*args, **kwargs)
AssertionError: ""\""to\""\ argument\ must\ be\ a\ list\ or\ tuple"" does not match ""'NoneType' object is not callable""
}}}"	Uncategorized	closed	Testing framework	1.8	Normal	fixed			Unreviewed	0	0	0	0	0	0
