[Pydev-cvs] org.python.pydev/tests/org/python/pydev/editor/codecompletion PythonCompletionTestWithou
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2005-09-05 00:07:04
|
Update of /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/editor/codecompletion In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1148/tests/org/python/pydev/editor/codecompletion Modified Files: PythonCompletionTestWithoutBuiltins.java Log Message: ok, getting completions for local imports Index: PythonCompletionTestWithoutBuiltins.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/editor/codecompletion/PythonCompletionTestWithoutBuiltins.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PythonCompletionTestWithoutBuiltins.java 4 Sep 2005 17:14:03 -0000 1.4 --- PythonCompletionTestWithoutBuiltins.java 5 Sep 2005 00:06:49 -0000 1.5 *************** *** 31,35 **** PythonCompletionTestWithoutBuiltins test = new PythonCompletionTestWithoutBuiltins(); test.setUp(); ! test.testRelativeImport(); test.tearDown(); System.out.println("Finished"); --- 31,35 ---- PythonCompletionTestWithoutBuiltins test = new PythonCompletionTestWithoutBuiltins(); test.setUp(); ! test.testInnerImport(); test.tearDown(); System.out.println("Finished"); *************** *** 73,89 **** requestCompl("from testlib import unittest , " , new String[]{"__init__", "unittest"}); ! requestCompl("from testlib.unittest import ", ! new String[]{ ! "__init__" ! , "anothertest" ! , "AnotherTest" ! , "GUITest" ! , "guitestcase" ! , "main" ! , "relative" ! , "TestCase" ! , "testcase" ! , "TestCaseAlias" ! }); requestCompl("from testlib.unittest.testcase.TestCase import assertImagesNotE", new String[]{"assertImagesNotEqual"}); --- 73,77 ---- requestCompl("from testlib import unittest , " , new String[]{"__init__", "unittest"}); ! requestCompl("from testlib.unittest import ", getTestLibUnittestTokens()); requestCompl("from testlib.unittest.testcase.TestCase import assertImagesNotE", new String[]{"assertImagesNotEqual"}); *************** *** 91,94 **** --- 79,100 ---- } + /** + * @return + */ + private String[] getTestLibUnittestTokens() { + return new String[]{ + "__init__" + , "anothertest" + , "AnotherTest" + , "GUITest" + , "guitestcase" + , "main" + , "relative" + , "TestCase" + , "testcase" + , "TestCaseAlias" + }; + } + public void testSelfReference() throws CoreException, BadLocationException{ *************** *** 107,110 **** --- 113,132 ---- } + public void testInnerImport() throws CoreException, BadLocationException{ + String s; + s = "" + + "def m1():\n" + + " from testlib import unittest\n" + + " unittest."; + requestCompl(s, s.length(), -1, new String[]{ + "AnotherTest" + , "GUITest" + , "main" + , "TestCase" + , "testcase" + , "TestCaseAlias" + }); + } + public void testSelfReferenceWithTabs() throws CoreException, BadLocationException{ |