Skip to content

Commit

Permalink
SONARPY-2365 Fix quality gate issues for ProjectLevelTypeTableTest (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
joke1196 authored Nov 25, 2024
1 parent 3be15cc commit 8b64d88
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class A: ...
ModuleType moduleLibType = (ModuleType) ((ExpressionStatement) fileInput.statements().statements().get(1)).expressions().get(0).typeV2();
assertThat(moduleLibType.name()).isEqualTo("lib");
assertThat(moduleLibType.members().values()).extracting(TypeWrapper::type).extracting(PythonType::name).containsExactly("A");
assertThat(moduleLibType.members().values()).extracting(TypeWrapper::type).allMatch(t -> t instanceof ClassType);
assertThat(moduleLibType.members().values()).extracting(TypeWrapper::type).allMatch(ClassType.class::isInstance);
}

@Test
Expand Down Expand Up @@ -222,7 +222,7 @@ class A: ...
assertThat(moduleLibType.name()).isEqualTo("lib");
// SONARPY-2176 lib should be resolved as the renamed class "A" here
assertThat(moduleLibType.members().values()).extracting(TypeWrapper::type).extracting(PythonType::name).containsExactly("A");
assertThat(moduleLibType.members().values()).extracting(TypeWrapper::type).allMatch(t -> t instanceof ClassType);
assertThat(moduleLibType.members().values()).extracting(TypeWrapper::type).allMatch(ClassType.class::isInstance);
}

@Test
Expand Down

0 comments on commit 8b64d88

Please sign in to comment.