On many installations the default matplotlib backend is something like TkAgg, which will produce an error if no display is available, even if you never try to show anything on it.
This patch forces the use of the headless "Agg" backend for the tests, which ensures that they will run without a display (i.e. on X11 systems, if $DISPLAY is unset).
On many installations the default matplotlib backend is something like TkAgg, which will produce an error if no display is available, even if you never try to show anything on it.
This patch forces the use of the headless "Agg" backend for the tests, which ensures that they will run without a display (i.e. on X11 systems, if $DISPLAY is unset).