Skip to content

Commit

Permalink
Add test about two functions of the same name but different parents
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Oct 29, 2024
1 parent a530731 commit 24a68dc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Famix-Python-Importer-Tests/FamixPythonProject1Test.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,18 @@ FamixPythonProject1Test >> testFunctionSourceAnchor [
return z' copyReplaceAll: String cr with: String lf)
]

{ #category : 'tests - functions' }
FamixPythonProject1Test >> testFunctionsWithSameNameButDifferentParents [

| functions |
functions := self model allFunctions select: [ :funct | funct name = 'function_with_common_name' ].

self assert: functions size equals: 2.
self assertCollection: (functions collect: #functionOwner) hasSameElements: {
(self moduleNamed: 'moduleAtRoot6').
(self packageNamed: 'root') }
]

{ #category : 'tests - methods' }
FamixPythonProject1Test >> testGetterAndSetter [

Expand Down

0 comments on commit 24a68dc

Please sign in to comment.