File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
python-frontend/src/test/java/org/sonar/python/semantic/v2 Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ class A: ...
178
178
ModuleType moduleLibType = (ModuleType ) ((ExpressionStatement ) fileInput .statements ().statements ().get (1 )).expressions ().get (0 ).typeV2 ();
179
179
assertThat (moduleLibType .name ()).isEqualTo ("lib" );
180
180
assertThat (moduleLibType .members ().values ()).extracting (TypeWrapper ::type ).extracting (PythonType ::name ).containsExactly ("A" );
181
- assertThat (moduleLibType .members ().values ()).extracting (TypeWrapper ::type ).allMatch (t -> t instanceof ClassType );
181
+ assertThat (moduleLibType .members ().values ()).extracting (TypeWrapper ::type ).allMatch (ClassType . class :: isInstance );
182
182
}
183
183
184
184
@ Test
@@ -222,7 +222,7 @@ class A: ...
222
222
assertThat (moduleLibType .name ()).isEqualTo ("lib" );
223
223
// SONARPY-2176 lib should be resolved as the renamed class "A" here
224
224
assertThat (moduleLibType .members ().values ()).extracting (TypeWrapper ::type ).extracting (PythonType ::name ).containsExactly ("A" );
225
- assertThat (moduleLibType .members ().values ()).extracting (TypeWrapper ::type ).allMatch (t -> t instanceof ClassType );
225
+ assertThat (moduleLibType .members ().values ()).extracting (TypeWrapper ::type ).allMatch (ClassType . class :: isInstance );
226
226
}
227
227
228
228
@ Test
You can’t perform that action at this time.
0 commit comments