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:
Mikhail Golubev
2015-02-18 19:30:49 +03:00
parent 151e8f52c2
commit 3a1cd8bc80
@@ -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