Add test_generator_expression_argument

This commit is contained in:
Jeong YunWon 2023-02-11 05:20:06 +09:00
parent 56c73cc63d
commit e7f14ab9b8
2 changed files with 346 additions and 0 deletions

View file

@ -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();