Python: Add tests

This commit is contained in:
Taus
2026-02-05 13:47:24 +00:00
parent bac356c9a1
commit 12ee93042b
3 changed files with 25 additions and 1 deletions

View File

@@ -86,3 +86,5 @@ if 38:
if 39:
r'a\
'
if 40:
f"{x:=^20}"

View File

@@ -1,4 +1,4 @@
Module: [1, 0] - [18, 0]
Module: [1, 0] - [20, 0]
body: [
Assign: [1, 0] - [1, 14]
targets: [
@@ -191,4 +191,24 @@ Module: [1, 0] - [18, 0]
]
]
orelse: None
If: [18, 0] - [18, 5]
test:
Num: [18, 3] - [18, 4]
n: 7
text: '7'
body: [
Expr: [19, 4] - [19, 43]
value:
TemplateString: [19, 4] - [19, 43]
prefix: 't"'
values: [
TemplateStringPart: [19, 6] - [19, 31]
text: '"With a format specifier: "'
s: 'With a format specifier: '
Name: [19, 32] - [19, 36]
variable: Variable('name', None)
ctx: Load
]
]
orelse: None
]

View File

@@ -15,3 +15,5 @@ if 5:
t"Multiple {first} and {second} placeholders."
if 6:
t"Implicit concatenation: " t"Hello, {name}!" t" How are you?"
if 7:
t"With a format specifier: {name:=^20}"