void () { final PyCodeInsightSettings settings = PyCodeInsightSettings.getInstance(); boolean oldValue = settings.PREFER_FROM_IMPORT; settings.PREFER_FROM_IMPORT = false; try { doTest(); } finally { settings.PREFER_FROM_IMPORT = oldValue; } }