Work around assertRaisesMessage not working on the latest Python 2.7.x.
Review Request #7466 — Created June 28, 2015 and submitted
There's a bug with Django's assertRaisesMessage and Python 2.7.9/2.7.10, which causes all usage as a context manager to fail. Python has reverted the change for 2.7.11, but Django has no plans to work around that. The workaround is easy, though. We just don't want to pass a default value for the callable down to assertRaisesRegex. This change provides our own implementation that fixes this issue.
All formerly-failing unit tests now pass.
Description | From | Last Updated |
---|---|---|
undefined name 'six' |
reviewbot |
- Change Summary:
-
Missed the
six
import when doinggit add -p
. - Commit:
-
70f016dfeefc146df7549f90a18b2ddea26ce00aa81c2886bf4272ed3bfdf2845bafa7e2b98e973f
- Diff:
-
Revision 2 (+17)