Skip to content

Commit 807afda

Browse files
[3.12] gh-106368: Increase Argument Clinic test coverage for IndentStack (GH-106933) (#106943)
(cherry picked from commit 8d228cf) Co-authored-by: Erlend E. Aasland <erlend@python.org>
1 parent 1a3766b commit 807afda

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Lib/test/test_clinic.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,25 @@ def test_function_not_at_column_0(self):
10351035
Nested docstring here, goeth.
10361036
""")
10371037

1038+
def test_indent_stack_no_tabs(self):
1039+
out = self.parse_function_should_fail("""
1040+
module foo
1041+
foo.bar
1042+
*vararg1: object
1043+
\t*vararg2: object
1044+
""")
1045+
msg = "Tab characters are illegal in the Clinic DSL."
1046+
self.assertIn(msg, out)
1047+
1048+
def test_indent_stack_illegal_outdent(self):
1049+
out = self.parse_function_should_fail("""
1050+
module foo
1051+
foo.bar
1052+
a: object
1053+
b: object
1054+
""")
1055+
self.assertIn("Illegal outdent", out)
1056+
10381057
def test_directive(self):
10391058
c = FakeClinic()
10401059
parser = DSLParser(c)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy