diff --git a/python/testData/inspections/PyProtectedMemberInspection/ClassInAnotherModule/a.py b/python/testData/inspections/PyProtectedMemberInspection/ClassInAnotherModule/a.py
new file mode 100644
index 000000000000..9063858e6dd8
--- /dev/null
+++ b/python/testData/inspections/PyProtectedMemberInspection/ClassInAnotherModule/a.py
@@ -0,0 +1,8 @@
+from m1 import A
+
+
+def f():
+ a = A()
+ a._foo()
+ return a._x
+
diff --git a/python/testData/inspections/PyProtectedMemberInspection/ClassInAnotherModule/m1.py b/python/testData/inspections/PyProtectedMemberInspection/ClassInAnotherModule/m1.py
new file mode 100644
index 000000000000..bdb27d88a959
--- /dev/null
+++ b/python/testData/inspections/PyProtectedMemberInspection/ClassInAnotherModule/m1.py
@@ -0,0 +1,6 @@
+class A:
+ def __init__(self):
+ self._x = 1
+
+ def _foo(self):
+ pass
diff --git a/python/testSrc/com/jetbrains/python/inspections/PyProtectedMemberInspectionTest.java b/python/testSrc/com/jetbrains/python/inspections/PyProtectedMemberInspectionTest.java
index e25abcb647b2..b92beb696623 100644
--- a/python/testSrc/com/jetbrains/python/inspections/PyProtectedMemberInspectionTest.java
+++ b/python/testSrc/com/jetbrains/python/inspections/PyProtectedMemberInspectionTest.java
@@ -80,6 +80,10 @@ public class PyProtectedMemberInspectionTest extends PyInspectionTestCase {
doMultiFileTest();
}
+ public void testClassInAnotherModule() {
+ doMultiFileTest();
+ }
+
@NotNull
@Override
protected Class extends PyInspection> getInspectionClass() {