Prune module-scope imports in tests.