8000 gh-106368: Increase Argument Clinic test coverage for IndentStack (#1… · python/cpython@8d228cf · GitHub
[go: up one dir, main page]

Skip to content

Commit 8d228cf

Browse files
gh-106368: Increase Argument Clinic test coverage for IndentStack (#106933)
1 parent 85ed1d2 commit 8d228cf

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)
0