SciTools/iris — pull request #908 by dkillick (2014-01-07 14:36:25+00:00)
Title: Force iris.tests to use TkAgg backend when called by idiff.py

This small change forces the use of the TkAgg backend by matplotlib in `iris.tests` when this is called by `idiff.py`. This is accomplished by adding the `-d` flag to `sys.argv` within `idiff.py`, which is then picked up when `iris.tests` is imported.

When a large number of test images differ (typical settings mean >20 images) and the backend is set to agg (as is the `iris.tests` default) then `idiff.py` will attempt to load all images simultaneously, leading to memory issues. The benefit of this change then is that forcing `iris.tests` to use TkAgg as the backend in this case avoids the problem.