From 1a267f8488ac4d53303a530e47d632f5bc29c275 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Fri, 21 Jul 2023 08:02:39 +0200 Subject: [PATCH] gh-106368: Increase Argument Clinic test coverage for IndentStack (GH-106933) (cherry picked from commit 8d228cf66f316803e95685d6553084f3d60cd9c5) Co-authored-by: Erlend E. Aasland --- Lib/test/test_clinic.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py index e925ecca1b9c5d..7c725e33f53928 100644 --- a/Lib/test/test_clinic.py +++ b/Lib/test/test_clinic.py @@ -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)