[Pydev-cvs] org.python.pydev/tests_completions/org/python/pydev/editor/codecompletion PythonComple
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2007-04-11 18:55:55
|
Update of /cvsroot/pydev/org.python.pydev/tests_completions/org/python/pydev/editor/codecompletion In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10908/tests_completions/org/python/pydev/editor/codecompletion Modified Files: PythonCompletionWithoutBuiltinsTest.java Log Message: Fixed issue where a completion recursion was found (when it shouldn't). Index: PythonCompletionWithoutBuiltinsTest.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/tests_completions/org/python/pydev/editor/codecompletion/PythonCompletionWithoutBuiltinsTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PythonCompletionWithoutBuiltinsTest.java 25 Mar 2007 18:36:07 -0000 1.2 --- PythonCompletionWithoutBuiltinsTest.java 11 Apr 2007 18:55:54 -0000 1.3 *************** *** 14,17 **** --- 14,18 ---- import org.eclipse.jface.text.Document; import org.eclipse.jface.text.contentassist.ICompletionProposal; + import org.python.pydev.core.ICallback; import org.python.pydev.core.IModule; import org.python.pydev.core.TestDependent; *************** *** 20,23 **** --- 21,26 ---- import org.python.pydev.core.docutils.StringUtils; import org.python.pydev.core.docutils.PySelection.ActivationTokenAndQual; + import org.python.pydev.core.log.Log; + import org.python.pydev.core.structure.CompletionRecursionException; import org.python.pydev.editor.codecompletion.revisited.CodeCompletionTestsBase; import org.python.pydev.editor.codecompletion.revisited.modules.CompiledModule; *************** *** 36,40 **** PythonCompletionWithoutBuiltinsTest test = new PythonCompletionWithoutBuiltinsTest(); test.setUp(); ! test.testDecorateObject(); test.tearDown(); System.out.println("Finished"); --- 39,43 ---- PythonCompletionWithoutBuiltinsTest test = new PythonCompletionWithoutBuiltinsTest(); test.setUp(); ! test.testSameName(); test.tearDown(); System.out.println("Finished"); *************** *** 56,59 **** --- 59,69 ---- this.restorePythonPath(false); codeCompletion = new PyCodeCompletion(); + PyCodeCompletion.onCompletionRecursionException = new ICallback<Object, CompletionRecursionException>(){ + + public Object call(CompletionRecursionException e) { + throw new RuntimeException("Recursion error:"+Log.getExceptionStr(e)); + } + + }; } *************** *** 64,67 **** --- 74,78 ---- CompiledModule.COMPILED_MODULES_ENABLED = true; super.tearDown(); + PyCodeCompletion.onCompletionRecursionException = null; } *************** *** 907,910 **** --- 918,929 ---- } + public void testRecursion1() throws Exception { + String s = + "from testrec5.messages import foonotexistent\n" + + "foonotexistent."; + + requestCompl(s, new String[] {}); + } + } |