TST : make tests use non-interactive matplotlib backend

Closes #3544