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

Commit 41a0ef8

Browse files
committed
Add test
1 parent 25cc1da commit 41a0ef8

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

parser/src/parser.rs

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

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)