TST: Set matplotlib backend to Agg in test