mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-25794 Test for stub->AST switch in PyProtectedMembersInspection
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
from m1 import A
|
||||
|
||||
|
||||
def f():
|
||||
a = A()
|
||||
<weak_warning descr="Access to a protected member _foo of a class">a._foo</weak_warning>()
|
||||
return <weak_warning descr="Access to a protected member _x of a class">a._x</weak_warning>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
class A:
|
||||
def __init__(self):
|
||||
self._x = 1
|
||||
|
||||
def _foo(self):
|
||||
pass
|
||||
@@ -80,6 +80,10 @@ public class PyProtectedMemberInspectionTest extends PyInspectionTestCase {
|
||||
doMultiFileTest();
|
||||
}
|
||||
|
||||
public void testClassInAnotherModule() {
|
||||
doMultiFileTest();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected Class<? extends PyInspection> getInspectionClass() {
|
||||
|
||||
Reference in New Issue
Block a user