| 3953 | |
| 3954 | #[test] |
| 3955 | fn test_ellipsis_statement() { |
| 3956 | for test_case in &[ |
| 3957 | "def a(): ...", |
| 3958 | "def a(): |
| 3959 | ...", |
| 3960 | "a = ...", |
| 3961 | "... + 1", |
| 3962 | ] { |
| 3963 | let mut parser = Parser::new(test_case); |
| 3964 | let program = parser.parse().expect("parsing failed"); |
| 3965 | |
| 3966 | insta::with_settings!({ |
| 3967 | description => test_case.to_string(), // the template source code |
| 3968 | snapshot_path => "../../test_data/output/", |
| 3969 | omit_expression => true // do not include the default expression |
| 3970 | }, { |
| 3971 | assert_debug_snapshot!(program); |
| 3972 | }); |
| 3973 | } |
| 3974 | } |
| 3975 | |
| 3976 | #[test] |
| 3977 | fn test_constant_value_get_source() { |