Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Oct 28, 2024
1 parent 4f764e6 commit 6925af5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ FamixPythonImporterWithFunctionsTest >> testFunction [
| func |
func := self functionNamed: 'tryToPlaceWord'.
self assert: func class equals: FamixPythonFunction.
self assert: func signature equals: 'grid,word'
self assert: func signature equals: 'tryToPlaceWord(grid,word)'
]

{ #category : 'tests - functions' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ Extension { #name : 'PyAssignmentStatementNode' }
PyAssignmentStatementNode >> isInstanceVariableAssignation [
"I am an inst var assignation if I am in the form of `self.x = y`. For now I don't know if I need to do more than checking if the value of the receiver of the left side is #self. I might refine this method later."

self lhs isSubscriptExpression ifTrue: [ ^ false ].

^ self lhs receiver name = #self
]
6 changes: 6 additions & 0 deletions src/Famix-Python-Importer/PyRootNode.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ PyRootNode >> fileReference [
^ self filename
]

{ #category : '*Famix-Python-Importer' }
PyRootNode >> isSubscriptExpression [

^ false
]

{ #category : '*Famix-Python-Importer' }
PyRootNode >> sourceFrom: startPosition to: stopPosition [

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : 'PySubscriptExpressionNode' }

{ #category : '*Famix-Python-Importer' }
PySubscriptExpressionNode >> isSubscriptExpression [

^ true
]

0 comments on commit 6925af5

Please sign in to comment.