Skip to content

Commit

Permalink
[3.11] gh-106368: Increase Argument Clinic test coverage for IndentSt…
Browse files Browse the repository at this point in the history
…ack (GH-106933) (#106944)

(cherry picked from commit 8d228cf)

Co-authored-by: Erlend E. Aasland <[email protected]>
  • Loading branch information
miss-islington and erlend-aasland authored Jul 21, 2023
1 parent a5c8d24 commit 951b08c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Lib/test/test_clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,25 @@ def test_function_not_at_column_0(self):
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)
Expand Down

0 comments on commit 951b08c

Please sign in to comment.