Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed May 19, 2023
1 parent 25cc1da commit 41a0ef8
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
20 changes: 20 additions & 0 deletions parser/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -853,4 +853,24 @@ def args_to_tuple(*args: *Ts) -> Tuple[*Ts]: ...
.unwrap();
insta::assert_debug_snapshot!(parse_ast);
}

#[test]
#[cfg(not(feature = "all-nodes-with-ranges"))]
fn decorator_ranges() {
let parse_ast = parse_program(
r#"
@my_decorator
def test():
pass
@class_decorator
class Abcd:
pass
"#
.trim(),
"<test>",
)
.unwrap();
insta::assert_debug_snapshot!(parse_ast);
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 41a0ef8

Please sign in to comment.