mirror of
https://github.com/github/codeql.git
synced 2026-02-12 05:01:06 +01:00
Python: Add tests
This commit is contained in:
@@ -86,3 +86,5 @@ if 38:
|
||||
if 39:
|
||||
r'a\
|
||||
'
|
||||
if 40:
|
||||
f"{x:=^20}"
|
||||
|
||||
@@ -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
|
||||
]
|
||||
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user