gh-106368: Increase Argument Clinic test coverage for IndentStack (#106933)

This commit is contained in:
Erlend E. Aasland 2023-07-21 08:02:39 +02:00 committed by GitHub
parent 85ed1d2442
commit 8d228cf66f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

View File

@ -1035,6 +1035,25 @@ class ClinicParserTest(_ParserBase):
Nested docstring here, goeth.
""")
def test_indent_stack_no_tabs(self):
out = self.parse_function_should_fail("""
module foo
foo.bar
*vararg1: object
\t*vararg2: object
""")
msg = "Tab characters are illegal in the Clinic DSL."
self.assertIn(msg, out)
def test_indent_stack_illegal_outdent(self):
out = self.parse_function_should_fail("""
module foo
foo.bar
a: object
b: object
""")
self.assertIn("Illegal outdent", out)
def test_directive(self):
c = FakeClinic()
parser = DSLParser(c)