Check if import source is located in the same package or above (PY-26139)

This commit is contained in:
Semyon Proshev
2018-04-09 17:48:57 +03:00
parent 9bdf80e66e
commit 45317ba634
9 changed files with 39 additions and 6 deletions
@@ -84,6 +84,16 @@ public class PyProtectedMemberInspectionTest extends PyInspectionTestCase {
runWithLanguageLevel(LanguageLevel.PYTHON36, this::doTest);
}
// PY-26139
public void testProtectedModuleInSamePackage() {
doMultiFileTest("my_package/module2.py");
}
// PY-26139
public void testProtectedModuleInPackageAbove() {
doMultiFileTest("my_package/my_subpackage/module2.py");
}
@NotNull
@Override
protected Class<? extends PyInspection> getInspectionClass() {