[Python-checkins] [3.12] gh-106368: Increase Argument Clinic test coverage for IndentStack (GH-106933) (#106943)
erlend-aasland
webhook-mailer at python.org
Fri Jul 21 02:32:34 EDT 2023
https://github.com/python/cpython/commit/807afdac416356c5e4558f11a8e1cfc5f0c86dd7
commit: 807afdac416356c5e4558f11a8e1cfc5f0c86dd7
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: erlend-aasland <erlend.aasland at protonmail.com>
date: 2023-07-21T06:32:30Z
summary:
[3.12] gh-106368: Increase Argument Clinic test coverage for IndentStack (GH-106933) (#106943)
(cherry picked from commit 8d228cf66f316803e95685d6553084f3d60cd9c5)
Co-authored-by: Erlend E. Aasland <erlend at python.org>
files:
M Lib/test/test_clinic.py
diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py
index e925ecca1b9c5..7c725e33f5392 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)
More information about the Python-checkins
mailing list