@@ -228,7 +228,6 @@ FASTPythonImporterTest >> testAttributeAccess [
228228 stack push: fast rootEntities anyOne containedEntities first.
229229 self assert: self topEntity sourceCode equals: ' obj.count' .
230230 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
231- self assert: (self topEntity isOfType: FASTTVariableEntity ).
232231
233232 " Testing value of monovalue relation attribute"
234233 self assert: self topEntity attribute isNotNil.
@@ -263,7 +262,6 @@ FASTPythonImporterTest >> testAttributeAccessNested [
263262 stack push: fast rootEntities anyOne containedEntities first.
264263 self assert: self topEntity sourceCode equals: ' obj.toto.count' .
265264 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
266- self assert: (self topEntity isOfType: FASTTVariableEntity ).
267265
268266 " Testing value of monovalue relation attribute"
269267 self assert: self topEntity attribute isNotNil.
@@ -280,7 +278,6 @@ FASTPythonImporterTest >> testAttributeAccessNested [
280278 stack push: self topEntity object.
281279 self assert: self topEntity sourceCode equals: ' obj.toto' .
282280 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
283- self assert: (self topEntity isOfType: FASTTVariableEntity ).
284281
285282 " Testing value of monovalue relation attribute"
286283 self assert: self topEntity attribute isNotNil.
@@ -315,7 +312,6 @@ FASTPythonImporterTest >> testAttributeAccessOnString [
315312 stack push: fast rootEntities anyOne containedEntities first.
316313 self assert: self topEntity sourceCode equals: ' ' ' ' ' .join' .
317314 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
318- self assert: (self topEntity isOfType: FASTTVariableEntity ).
319315
320316 " Testing value of monovalue relation attribute"
321317 self assert: self topEntity attribute isNotNil.
@@ -352,7 +348,6 @@ FASTPythonImporterTest >> testAttributeAccessWithReceiverParenthesised [
352348 stack push: fast rootEntities anyOne containedEntities first.
353349 self assert: self topEntity sourceCode equals: ' (obj).attribute' .
354350 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
355- self assert: (self topEntity isOfType: FASTTVariableEntity ).
356351
357352 " Testing value of monovalue relation attribute"
358353 self assert: self topEntity attribute isNotNil.
@@ -612,7 +607,6 @@ FASTPythonImporterTest >> testCallArgumentWithAttribute [
612607 stack push: (stack top arguments at: 1 ).
613608 self assert: self topEntity sourceCode equals: ' CFG.seed' .
614609 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
615- self assert: (self topEntity isOfType: FASTTVariableEntity ).
616610
617611 " Testing value of monovalue relation attribute"
618612 self assert: self topEntity attribute isNotNil.
@@ -769,7 +763,6 @@ FASTPythonImporterTest >> testCallArgumentWithCall [
769763 stack push: self topEntity callee.
770764 self assert: self topEntity sourceCode equals: ' data[0].replace' .
771765 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
772- self assert: (self topEntity isOfType: FASTTVariableEntity ).
773766
774767 " Testing value of monovalue relation attribute"
775768 self assert: self topEntity attribute isNotNil.
@@ -1270,7 +1263,6 @@ FASTPythonImporterTest >> testCallWithAttribute [
12701263 stack push: self topEntity callee.
12711264 self assert: self topEntity sourceCode equals: ' tqdm.pandas' .
12721265 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
1273- self assert: (self topEntity isOfType: FASTTVariableEntity ).
12741266
12751267 " Testing value of monovalue relation attribute"
12761268 self assert: self topEntity attribute isNotNil.
@@ -1678,7 +1670,6 @@ def funct(): pass'.
16781670 stack push: self topEntity expression.
16791671 self assert: self topEntity sourceCode equals: ' functools.lru_cache' .
16801672 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
1681- self assert: (self topEntity isOfType: FASTTVariableEntity ).
16821673
16831674 " Testing value of monovalue relation attribute"
16841675 self assert: self topEntity attribute isNotNil.
@@ -1764,7 +1755,6 @@ def funct(): pass'.
17641755 stack push: self topEntity callee.
17651756 self assert: self topEntity sourceCode equals: ' factory.make_decorator' .
17661757 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
1767- self assert: (self topEntity isOfType: FASTTVariableEntity ).
17681758
17691759 " Testing value of monovalue relation attribute"
17701760 self assert: self topEntity attribute isNotNil.
@@ -2271,7 +2261,6 @@ FASTPythonImporterTest >> testDictionaryComprehension [
22712261 stack push: self topEntity callee.
22722262 self assert: self topEntity sourceCode equals: ' class_indices.items' .
22732263 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
2274- self assert: (self topEntity isOfType: FASTTVariableEntity ).
22752264
22762265 " Testing value of monovalue relation attribute"
22772266 self assert: self topEntity attribute isNotNil.
@@ -4264,6 +4253,58 @@ FASTPythonImporterTest >> testInterpolation [
42644253 self assert: (self topEntity isOfType: FASTPyIdentifier )
42654254]
42664255
4256+ { #category : ' tests - literals' }
4257+ FASTPythonImporterTest >> testInterpolationWithAttributeAccess [
4258+ < generated>
4259+ " Generated as regression test by FASTPyImporterTestGenerator>>#generateTestNamed:fromCode:protocol:
4260+ Regenerate executing: self regenerateTest: #testInterpolationWithAttributeAccess "
4261+
4262+ self parse: ' f"{CFG.model_name}"' .
4263+
4264+ self assert: (fast allWithType: FASTPyAttributeAccess ) size equals: 1 .
4265+ self assert: (fast allWithType: FASTPyIdentifier ) size equals: 1 .
4266+ self assert: (fast allWithType: FASTPyInterpolation ) size equals: 1 .
4267+ self assert: (fast allWithType: FASTPyModule ) size equals: 1 .
4268+ self assert: (fast allWithType: FASTPyString ) size equals: 1 .
4269+ self assert: (fast allWithType: FASTPyVariable ) size equals: 1 .
4270+
4271+ stack push: fast rootEntities anyOne containedEntities first.
4272+ self assert: self topEntity sourceCode equals: ' f"{CFG.model_name}"' .
4273+ self assert: (self topEntity isOfType: FASTPyString ).
4274+ self assert: (self topEntity isOfType: FASTTLiteral ).
4275+ self assert: (self topEntity isOfType: FASTTStringLiteral ).
4276+
4277+ " Testing value of multivalued relation interpolations"
4278+ self assert: self topEntity interpolations size equals: 1 .
4279+
4280+ stack push: (stack top interpolations at: 1 ).
4281+ self assert: self topEntity sourceCode equals: ' {CFG.model_name}' .
4282+ self assert: (self topEntity isOfType: FASTPyInterpolation ).
4283+
4284+ " Testing value of monovalue relation expression"
4285+ self assert: self topEntity expression isNotNil.
4286+
4287+ stack push: self topEntity expression.
4288+ self assert: self topEntity sourceCode equals: ' CFG.model_name' .
4289+ self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
4290+
4291+ " Testing value of monovalue relation attribute"
4292+ self assert: self topEntity attribute isNotNil.
4293+
4294+ stack push: self topEntity attribute.
4295+ self assert: self topEntity sourceCode equals: ' model_name' .
4296+ self assert: (self topEntity isOfType: FASTPyVariable ).
4297+ self assert: (self topEntity isOfType: FASTTVariableEntity ).
4298+ stack pop.
4299+
4300+ " Testing value of monovalue relation object"
4301+ self assert: self topEntity object isNotNil.
4302+
4303+ stack push: self topEntity object.
4304+ self assert: self topEntity sourceCode equals: ' CFG' .
4305+ self assert: (self topEntity isOfType: FASTPyIdentifier )
4306+ ]
4307+
42674308{ #category : ' tests - literals' }
42684309FASTPythonImporterTest >> testInterpolationWithFormatSpecifier [
42694310 < generated>
@@ -5402,7 +5443,6 @@ FASTPythonImporterTest >> testSetComprehension [
54025443 stack push: self topEntity callee.
54035444 self assert: self topEntity sourceCode equals: ' v.items' .
54045445 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
5405- self assert: (self topEntity isOfType: FASTTVariableEntity ).
54065446
54075447 " Testing value of monovalue relation attribute"
54085448 self assert: self topEntity attribute isNotNil.
@@ -5468,7 +5508,6 @@ FASTPythonImporterTest >> testSliceAttribute [
54685508 stack push: (stack top components at: 1 ).
54695509 self assert: self topEntity sourceCode equals: ' obj.attr' .
54705510 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
5471- self assert: (self topEntity isOfType: FASTTVariableEntity ).
54725511
54735512 " Testing value of monovalue relation attribute"
54745513 self assert: self topEntity attribute isNotNil.
@@ -6206,7 +6245,6 @@ FASTPythonImporterTest >> testSubscriptOnAttribute [
62066245 stack push: self topEntity value.
62076246 self assert: self topEntity sourceCode equals: ' os.environ' .
62086247 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
6209- self assert: (self topEntity isOfType: FASTTVariableEntity ).
62106248
62116249 " Testing value of monovalue relation attribute"
62126250 self assert: self topEntity attribute isNotNil.
@@ -6260,7 +6298,6 @@ FASTPythonImporterTest >> testSubscriptOnAttributeWithParenthesis [
62606298 stack push: self topEntity value.
62616299 self assert: self topEntity sourceCode equals: ' os.environ' .
62626300 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
6263- self assert: (self topEntity isOfType: FASTTVariableEntity ).
62646301
62656302 " Testing value of monovalue relation attribute"
62666303 self assert: self topEntity attribute isNotNil.
@@ -6355,7 +6392,6 @@ FASTPythonImporterTest >> testSubscriptWithAttributeInSubscript [
63556392 stack push: (stack top indices at: 1 ).
63566393 self assert: self topEntity sourceCode equals: ' obj.attr' .
63576394 self assert: (self topEntity isOfType: FASTPyAttributeAccess ).
6358- self assert: (self topEntity isOfType: FASTTVariableEntity ).
63596395
63606396 " Testing value of monovalue relation attribute"
63616397 self assert: self topEntity attribute isNotNil.
0 commit comments