Skip to content

Commit

Permalink
Model should have a root folder
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Sep 12, 2024
1 parent 3de52e8 commit 6eb121f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ FamixPythonProject1Test >> model [
^ FamixPythonProject1TestResource current model
]

{ #category : 'tests' }
FamixPythonProject1Test >> testModel [

self assert: self model isNotEmpty.
self assert: self model name equals: 'project1'.
self assert: self model rootFolder equals: FamixPythonBridge parsingExamples / 'project1'
]

{ #category : 'tests - modules' }
FamixPythonProject1Test >> testModuleInRootPackage [

Expand Down
7 changes: 5 additions & 2 deletions src/Famix-Python-Importer/FamixPythonImporter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ FamixPythonImporter >> import: aFileName [
visitor rootFilePath: aFileName.

fileReference := aFileName asFileReference.
visitor model name: fileReference basename.
visitor model
name: fileReference basename;
rootFolder: aFileName asFileReference.


self importFileReference: fileReference.

^visitor model
^ visitor model
]

{ #category : 'api' }
Expand Down

0 comments on commit 6eb121f

Please sign in to comment.