mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-26 22:44:38 +00:00
Add test_generator_expression_argument
This commit is contained in:
parent
56c73cc63d
commit
e7f14ab9b8
2 changed files with 346 additions and 0 deletions
|
@ -310,6 +310,19 @@ with (0 as a, 1 as b,): pass
|
|||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_generator_expression_argument() {
|
||||
let source = r#"' '.join(
|
||||
sql
|
||||
for sql in (
|
||||
"LIMIT %d" % limit if limit else None,
|
||||
("OFFSET %d" % offset) if offset else None,
|
||||
)
|
||||
)"#;
|
||||
let parse_ast = parse_expression(source, "<test>").unwrap();
|
||||
insta::assert_debug_snapshot!(parse_ast);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_dict_unpacking() {
|
||||
let parse_ast = parse_expression(r#"{"a": "b", **c, "d": "e"}"#, "<test>").unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue