use of org.python.pydev.ast.codecompletion.PyCodeCompletion in project Pydev by fabioz.
the class TddCodeGenerationQuickFixParticipantTest method setUp.
/*
* @see TestCase#setUp()
*/
@Override
public void setUp() throws Exception {
super.setUp();
AbstractPyRefactoring.setPyRefactoring(new Refactorer());
CompiledModule.COMPILED_MODULES_ENABLED = false;
this.restorePythonPath(TestDependent.getCompletePythonLib(true, isPython3Test()) + "|" + TestDependent.PYTHON2_PIL_PACKAGES + "|" + TestDependent.TEST_PYSRC_TESTING_LOC + "configobj-4.6.0-py2.6.egg", false);
this.restorePythonPath(false);
codeCompletion = new PyCodeCompletion();
TddCodeGenerationQuickFixParticipant.onGetTddPropsError = new ICallback<Boolean, Exception>() {
@Override
public Boolean call(Exception e) {
throw new RuntimeException("Error:" + org.python.pydev.shared_core.log.Log.getExceptionStr(e));
}
};
PyCodeCompletion.onCompletionRecursionException = new ICallback<Object, CompletionRecursionException>() {
@Override
public Object call(CompletionRecursionException e) {
throw new RuntimeException("Recursion error:" + org.python.pydev.shared_core.log.Log.getExceptionStr(e));
}
};
}
use of org.python.pydev.ast.codecompletion.PyCodeCompletion in project Pydev by fabioz.
the class HierarchyTestCase method setUp.
/*
* @see TestCase#setUp()
*/
@Override
public void setUp() throws Exception {
super.setUp();
CompiledModule.COMPILED_MODULES_ENABLED = true;
this.restorePythonPath(TestDependent.getCompletePythonLib(true, isPython3Test()) + "|" + file.getParent(), false);
codeCompletion = new PyCodeCompletion();
// we don't want to start it more than once
if (shell == null) {
shell = PythonShellTest.startShell();
}
AbstractShell.putServerShell(nature, AbstractShell.getShellId(), shell);
}
use of org.python.pydev.ast.codecompletion.PyCodeCompletion in project Pydev by fabioz.
the class ParameterCompletionTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
CompiledModule.COMPILED_MODULES_ENABLED = false;
useOriginalRequestCompl = true;
participant = new CtxParticipant();
ExtensionHelper.testingParticipants = new HashMap<String, List<Object>>();
ArrayList<Object> participants = new ArrayList<Object>();
/*IPyDevCompletionParticipant*/
participants.add(participant);
ExtensionHelper.testingParticipants.put(ExtensionHelper.PYDEV_COMPLETION, participants);
codeCompletion = new PyCodeCompletion();
this.restorePythonPath(false);
final IEclipsePreferences prefs = new InMemoryEclipsePreferences();
PyCodeCompletionPreferences.getPreferencesForTests = () -> prefs;
prefs.putBoolean(PyCodeCompletionPreferences.MATCH_BY_SUBSTRING_IN_CODE_COMPLETION, false);
}
use of org.python.pydev.ast.codecompletion.PyCodeCompletion in project Pydev by fabioz.
the class PythonCompletionParametersTest method setUp.
/*
* @see TestCase#setUp()
*/
@Override
public void setUp() throws Exception {
super.setUp();
CompiledModule.COMPILED_MODULES_ENABLED = false;
this.restorePythonPath(false);
codeCompletion = new PyCodeCompletion();
}
use of org.python.pydev.ast.codecompletion.PyCodeCompletion in project Pydev by fabioz.
the class AbstractJythonWorkbenchTests method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
// Set Interpreter Configuration Auto to DONT_ASK. We can't have the
// Python not configured dialog open in the tests as that causes the tests to hang
IPreferenceStore store = PydevPlugin.getDefault().getPreferenceStore();
store.setValue(InterpreterGeneralPreferences.NOTIFY_NO_INTERPRETER_PY, false);
store.setValue(InterpreterGeneralPreferences.NOTIFY_NO_INTERPRETER_JY, false);
store.setValue(InterpreterGeneralPreferences.NOTIFY_NO_INTERPRETER_IP, false);
CompiledModule.COMPILED_MODULES_ENABLED = true;
this.restorePythonPath(false);
codeCompletion = new PyCodeCompletion();
}
Aggregations