Skip to content

Commit

Permalink
Fix weird merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Sep 2, 2024
1 parent 3ee51d5 commit 2cd511c
Showing 1 changed file with 0 additions and 76 deletions.
76 changes: 0 additions & 76 deletions src/Famix-Python-Importer-Tests/FamixPythonImporterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,6 @@ FamixPythonImporterTest >> testAttribute [
class attributes do: [ :attributes | self assert: (#( width height my_joystick ) anySatisfy: [ :name | name = attributes name ]) ]
]

{ #category : 'tests - classes' }
FamixPythonImporterTest >> testClass [

| ballClass wallClass |
importer accept: pyDoc.
ballClass := importer classNamed: 'Ball'.
self assert: ballClass class equals: FamixPythonClass.
self assert: ballClass name equals: 'Ball'.
self deny: ballClass isStub.

wallClass := importer classNamed: 'Wall'.
self assert: wallClass name equals: 'Wall'.
self deny: wallClass isStub.
]

{ #category : 'tests - attributes' }
FamixPythonImporterTest >> testClassAttributes [

Expand Down Expand Up @@ -167,28 +152,6 @@ class B:
self assert: classB attributes first name equals: 'a'
]

{ #category : 'tests - classes' }
FamixPythonImporterTest >> testClassKnowsItsMethods [

| cl |
importer accept: pyDoc.
cl := importer classNamed: 'Player'.
self assert: cl methods first name equals: '__init__'.
self assert: cl methods first signature equals: 'self, x, y, joystick_no'.

]

{ #category : 'tests - classes' }
FamixPythonImporterTest >> testClassSuperclass [

| class |
importer accept: pyDoc.
class := importer classNamed: 'Player'.
self assert: class class equals: FamixPythonClass.
self assert: class superclass isNotNil.
self assert: class superclass name equals: 'Sprite'
]

{ #category : 'tests - decorators' }
FamixPythonImporterTest >> testDecoratorsFunctionSingleDecorator [
"https://realpython.com/primer-on-python-decorators/"
Expand Down Expand Up @@ -254,28 +217,6 @@ FamixPythonImporterTest >> testFileIsOk [

]

{ #category : 'tests - functions' }
FamixPythonImporterTest >> testFunction [

| func |
importer accept: pyDoc2.
func := importer functionNamed: 'tryToPlaceWord'.
self assert: func class equals: FamixPythonFunction.
self assert: func signature equals: 'grid,word'

]

{ #category : 'tests - functions' }
FamixPythonImporterTest >> testFunctionKnowsItsModule [

| func module |
importer accept: pyDoc2.
func := importer functionNamed: 'tryToPlaceWord'.
module := importer moduleNamed: 'sprite_collect_blocks_2'.
self assert: func functionOwner equals: module.
self assert: func functionOwner class equals: FamixPythonModule
]

{ #category : 'tests - lambdas' }
FamixPythonImporterTest >> testFunctionNoLambda [

Expand Down Expand Up @@ -315,23 +256,6 @@ def identity():

]

{ #category : 'tests - functions' }
FamixPythonImporterTest >> testFunctionWithParameter [

| param func |
importer accept: pyDoc2.

param := importer
parameterNamed: 'word'
inBehavioural: (importer functionNamed: 'tryToPlaceWord').
func := param parentBehaviouralEntity.

self assert: func class equals: FamixPythonFunction.
self assert: (func signature includesSubstring: 'word') equals: true.

self assert: param isNotNil
]

{ #category : 'tests - import' }
FamixPythonImporterTest >> testImport [

Expand Down

0 comments on commit 2cd511c

Please sign in to comment.