| 3662 | |
| 3663 | #[test] |
| 3664 | fn test_yield_expression() { |
| 3665 | for test_case in &["yield", "yield a", "yield from a"] { |
| 3666 | let mut parser = Parser::new(test_case); |
| 3667 | let program = parser.parse().expect("parsing failed"); |
| 3668 | |
| 3669 | insta::with_settings!({ |
| 3670 | description => test_case.to_string(), // the template source code |
| 3671 | snapshot_path => "../../test_data/output/", |
| 3672 | omit_expression => true // do not include the default expression |
| 3673 | }, { |
| 3674 | assert_debug_snapshot!(program); |
| 3675 | }); |
| 3676 | } |
| 3677 | } |
| 3678 | |
| 3679 | #[test] |
| 3680 | fn test_starred() { |