Skip to content

Commit

Permalink
Assignation of class variables with a tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Oct 30, 2024
1 parent e2f14f9 commit 594cf2a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/Famix-Python-Importer-Tests/FamixPythonProject1Test.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,34 @@ FamixPythonProject1Test >> testClassVariableSourceAnchor [
self assert: variable sourceAnchor endPos equals: 581
]

{ #category : 'tests - attributes' }
FamixPythonProject1Test >> testClassVariablesAssignedWithATuple [

| variable |
self denyEmpty: self model allAttributes.

variable := self attributeNamed: 'cvarTuple1'.

self assert: variable class equals: FamixPythonAttribute.
self assert: variable name equals: 'cvarTuple1'.
self assert: variable parentType equals: (self classNamed: 'ClassWithTuples').
self assert: variable isClassSide.

variable := self attributeNamed: 'cvarTuple2'.

self assert: variable class equals: FamixPythonAttribute.
self assert: variable name equals: 'cvarTuple2'.
self assert: variable parentType equals: (self classNamed: 'ClassWithTuples').
self assert: variable isClassSide.

variable := self attributeNamed: 'cvarTuple3'.

self assert: variable class equals: FamixPythonAttribute.
self assert: variable name equals: 'cvarTuple3'.
self assert: variable parentType equals: (self classNamed: 'ClassWithTuples').
self assert: variable isClassSide
]

{ #category : 'tests - attributes' }
FamixPythonProject1Test >> testClassVariablesWithSameNameButDifferenClass [

Expand Down

0 comments on commit 594cf2a

Please sign in to comment.