Skip to content

Commit d201c13

Browse files
committed
Add tests for case + soft keyword colorization
1 parent 2cc0da9 commit d201c13

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Lib/test/test_pyrepl/test_utils.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,15 @@ def test_gen_colors_keyword_highlighting(self):
125125
("import", "keyword"),
126126
],
127127
),
128+
# `case` soft keyword with unary +/- operators (gh-145239)
129+
(
130+
"case +1",
131+
[("case", "soft_keyword"), ("+", "op")],
132+
),
133+
(
134+
"case -1",
135+
[("case", "soft_keyword"), ("-", "op")],
136+
),
128137
]
129138
for code, expected_highlights in cases:
130139
with self.subTest(code=code):

0 commit comments

Comments
 (0)