mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix broken test in PythonCompletionTest
It's not clear why "subpack" was supposed to be suggested in this case, though.
This commit is contained in:
@@ -508,18 +508,16 @@ public class PythonCompletionTest extends PyTestCase {
|
||||
}
|
||||
|
||||
public void testRelativeImportExcludeToplevel() { // PY-6304
|
||||
setLanguageLevel(LanguageLevel.PYTHON27);
|
||||
try {
|
||||
myFixture.copyDirectoryToProject("completion/relativeImportExcludeToplevel", "");
|
||||
myFixture.configureByFile("pack/subpack/modX.py");
|
||||
myFixture.completeBasic();
|
||||
final List<String> lookupElementStrings = myFixture.getLookupElementStrings();
|
||||
assertNotNull(lookupElementStrings);
|
||||
assertFalse(lookupElementStrings.contains("sys"));
|
||||
}
|
||||
finally {
|
||||
setLanguageLevel(null);
|
||||
}
|
||||
runWithLanguageLevel(LanguageLevel.PYTHON27, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
myFixture.copyDirectoryToProject("completion/relativeImportExcludeToplevel", "");
|
||||
myFixture.configureByFile("pack/subpack/modX.py");
|
||||
myFixture.completeBasic();
|
||||
assertNull(myFixture.getLookupElementStrings());
|
||||
myFixture.checkResult("from ...subpack import");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// PY-2813
|
||||
|
||||
Reference in New Issue
Block a user