Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.

Commit 89c63a6

Browse files
committed
Add test
1 parent 25cc1da commit 89c63a6

File tree

2 files changed

+91
-0
lines changed

2 files changed

+91
-0
lines changed

parser/src/parser.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,4 +853,23 @@ def args_to_tuple(*args: *Ts) -> Tuple[*Ts]: ...
853853
.unwrap();
854854
insta::assert_debug_snapshot!(parse_ast);
855855
}
856+
857+
#[test]
858+
fn decorator_ranges() {
859+
let parse_ast = parse_program(
860+
r#"
861+
@my_decorator
862+
def test():
863+
pass
864+
865+
@class_decorator
866+
class Abcd:
867+
pass
868+
"#
869+
.trim(),
870+
"<test>",
871+
)
872+
.unwrap();
873+
insta::assert_debug_snapshot!(parse_ast);
874+
}
856875
}

parser/src/snapshots/rustpython_parser__parser__tests__decorator_ranges.snap

Lines changed: 72 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)