Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SONARPY-2365 Fix quality gate issues for ProjectLevelTypeTableTest #2177

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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