diff --git a/src/Famix-Python-Importer-Tests/FamixPythonProject1Test.class.st b/src/Famix-Python-Importer-Tests/FamixPythonProject1Test.class.st index 02fa5fe..0a7ab00 100644 --- a/src/Famix-Python-Importer-Tests/FamixPythonProject1Test.class.st +++ b/src/Famix-Python-Importer-Tests/FamixPythonProject1Test.class.st @@ -114,6 +114,50 @@ FamixPythonProject1Test >> testClassImportsModule [ self assert: import sourceText equals: 'import moduleAtRoot3' ] +{ #category : 'tests - classes' } +FamixPythonProject1Test >> testClassInClass [ + + | class | + class := self classNamed: 'ClassInClass'. + + self assert: class class equals: FamixPythonClass. + self assert: class name equals: 'ClassInClass'. + self assert: class typeContainer equals: (self classNamed: 'ClassWithClasses') +] + +{ #category : 'tests - classes' } +FamixPythonProject1Test >> testClassInFunction [ + + | class | + class := self classNamed: 'ClassInFunction'. + + self assert: class class equals: FamixPythonClass. + self assert: class name equals: 'ClassInFunction'. + self assert: class typeContainer equals: (self functionNamed: 'function_with_class_inside') +] + +{ #category : 'tests - classes' } +FamixPythonProject1Test >> testClassInMethod [ + + | class | + class := self classNamed: 'ClassInMethod'. + + self assert: class class equals: FamixPythonClass. + self assert: class name equals: 'ClassInMethod'. + self assert: class typeContainer equals: ((self classNamed: 'ClassWithClasses') methods detect: #isConstructor) +] + +{ #category : 'tests - classes' } +FamixPythonProject1Test >> testClassInModule [ + + | class | + class := self classNamed: 'ClassWithClasses'. + + self assert: class class equals: FamixPythonClass. + self assert: class name equals: 'ClassWithClasses'. + self assert: class typeContainer equals: (self moduleNamed: 'moduleWithClasses') +] + { #category : 'tests - classes' } FamixPythonProject1Test >> testClassInPackage [