Work around assertRaisesMessage not working on the latest Python 2.7.x.

Review Request #7466 — Created June 28, 2015 and submitted

chipx86
Djblets
release-0.8.x
a81c288...
djblets
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'

reviewbotreviewbot
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        djblets/testing/testcases.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        djblets/testing/testcases.py
    
    
  2. djblets/testing/testcases.py (Diff revision 1)
     
     
     undefined name 'six'
    
  3. 
      
chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/testing/testcases.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/testing/testcases.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.8.x (236c77c)
Loading...