diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-07-21 06:32:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-21 06:32:30 (GMT) |
commit | 807afdac416356c5e4558f11a8e1cfc5f0c86dd7 (patch) | |
tree | 2672b7bdf643a19dfa70197fb4cf3062641e18e4 /Lib/test | |
parent | 1a3766bb3e5ad5cdd7c3e4c352eb0147ccc9a6ce (diff) | |
download | cpython-807afdac416356c5e4558f11a8e1cfc5f0c86dd7.zip cpython-807afdac416356c5e4558f11a8e1cfc5f0c86dd7.tar.gz cpython-807afdac416356c5e4558f11a8e1cfc5f0c86dd7.tar.bz2 |
[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@python.org>
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_clinic.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py index e925ecc..7c725e3 100644 --- a/Lib/test/test_clinic.py +++ b/Lib/test/test_clinic.py @@ -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) |