diff --git a/cpg-language-python/src/test/kotlin/de/fraunhofer/aisec/cpg/frontends/python/PythonFrontendTest.kt b/cpg-language-python/src/test/kotlin/de/fraunhofer/aisec/cpg/frontends/python/PythonFrontendTest.kt index ec275da66d5..f6515771097 100644 --- a/cpg-language-python/src/test/kotlin/de/fraunhofer/aisec/cpg/frontends/python/PythonFrontendTest.kt +++ b/cpg-language-python/src/test/kotlin/de/fraunhofer/aisec/cpg/frontends/python/PythonFrontendTest.kt @@ -351,6 +351,10 @@ class PythonFrontendTest : BaseTest() { assertEquals(4, recordFoo.fields.size) assertEquals(1, recordFoo.methods.size) + // TODO: When developing the new python frontend, remove the type specifier from the field + // again and check if the field still occurs. It's absolutely not clear to me who would be + // responsible for adding it but IMHO it should be the frontend. This, however, is + // currently not the case. val fieldX = recordFoo.fields["x"] assertNotNull(fieldX) diff --git a/cpg-language-python/src/test/resources/python/class_fields.py b/cpg-language-python/src/test/resources/python/class_fields.py index 3df4ec440b9..ed833025105 100644 --- a/cpg-language-python/src/test/resources/python/class_fields.py +++ b/cpg-language-python/src/test/resources/python/class_fields.py @@ -1,5 +1,5 @@ class Foo: - x + x: int y = 123 def bar(self):