Do imports only when running tests.

This is to avoid core tests from having to depend on the GTKUI required packages
asd