Skip to content

Commit

Permalink
SONARPY-2225 clean TODOs from PythonTypeToDescriptorConverterTest
Browse files Browse the repository at this point in the history
  • Loading branch information
1 parent 9b1b673 commit 61cd108
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ void testConvertFunctionTypeWithoutDecorator() {
assertThat(functionDescriptor.isAsynchronous()).isTrue();
assertThat(functionDescriptor.isInstanceMethod()).isTrue();

// TODO SONARPY-2223 support for return type is missing in FunctionType
// SONARPY-2306 support for return type is missing in FunctionType
assertThat(functionDescriptor.annotatedReturnTypeName()).isNull();

// TODO SONARPY-2223 support for type annotation is missing in FunctionType
// SONARPY-2306 support for type annotation is missing in FunctionType
assertThat(functionDescriptor.typeAnnotationDescriptor()).isNull();

assertThat(functionDescriptor.hasDecorators()).isTrue();
Expand Down Expand Up @@ -131,11 +131,11 @@ void testConvertClassType() {
assertThat(classDescriptor.definitionLocation()).isEqualTo(location);
assertThat(classDescriptor.hasMetaClass()).isTrue();

// TODO SONARPY-2222 support for superClass is missing in ClassType
// SONARPY-2307 support for superClass is missing in ClassType
assertThat(classDescriptor.hasSuperClassWithoutDescriptor()).isFalse();
// TODO SONARPY-2222 support for metaclassFQN is missing in ClassType
// SONARPY-2307 support for metaclassFQN is missing in ClassType
assertThat(classDescriptor.metaclassFQN()).isNull();
// TODO SONARPY-2222 support for generics is missing in ClassType
// SONARPY-2307 support for generics is missing in ClassType
assertThat(classDescriptor.supportsGenerics()).isFalse();
}

Expand Down Expand Up @@ -198,7 +198,7 @@ void testConvertUnionType() {
assertThat(ambiguousDescriptor.name()).isEqualTo("myUnionType");
assertThat(ambiguousDescriptor.fullyQualifiedName()).isEqualTo("foo.myUnionType");
assertThat(ambiguousDescriptor.kind()).isEqualTo(Descriptor.Kind.AMBIGUOUS);
// TODO SONARPY-2225 the two class types in the union are rigorously the same but the converter creates an ambigouous symbol
// SONARPY-2307 the two class types in the union are rigorously the same but the converter creates an ambigouous symbol
assertThat(ambiguousDescriptor.alternatives()).hasSize(2);
assertThat(ambiguousDescriptor.alternatives()).extracting(Descriptor::name).containsExactlyInAnyOrder("myUnionType", "myUnionType");
assertThat(ambiguousDescriptor.alternatives()).extracting(Object::getClass).allMatch(c -> c == ClassDescriptor.class);
Expand Down Expand Up @@ -232,7 +232,7 @@ void testConvertManyTypesWithUnionType() {
assertThat(ambiguousDescriptor.name()).isEqualTo("myUnionType");
assertThat(ambiguousDescriptor.fullyQualifiedName()).isEqualTo("foo.myUnionType");
assertThat(ambiguousDescriptor.kind()).isEqualTo(Descriptor.Kind.AMBIGUOUS);
// TODO SONARPY-2225 the two class types in the union are rigorously the same but the converter creates an ambigouous descriptor
// SONARPY-2307 the two class types in the union are rigorously the same but the converter creates an ambigouous descriptor
assertThat(ambiguousDescriptor.alternatives()).hasSize(3);
assertThat(ambiguousDescriptor.alternatives()).extracting(Descriptor::name).allMatch(s -> s.equals("myUnionType"));
assertThat(ambiguousDescriptor.alternatives()).extracting(Object::getClass).allMatch(c -> c == ClassDescriptor.class);
Expand Down

0 comments on commit 61cd108

Please sign in to comment.