[test] use Agg device when there is no DISPLAY
[test] use Agg device when there is no DISPLAY

AndreasMadsen/bachelor-code,AndreasMadsen/bachelor-code,AndreasMadsen/bachelor-code,AndreasMadsen/bachelor-code