diff options
author | Larry Hastings <larry@hastings.org> | 2013-10-27 09:49:39 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2013-10-27 09:49:39 (GMT) |
commit | dfcd46769b7a31f42709bba0fb298a80e65ab932 (patch) | |
tree | 56f09593503c127c2041a0bd817c50d98baa4bbf /Tools/clinic/clinic_test.py | |
parent | 186729e81211ad04a2db523c3ac9e8e79aed3fd9 (diff) | |
download | cpython-dfcd46769b7a31f42709bba0fb298a80e65ab932.zip cpython-dfcd46769b7a31f42709bba0fb298a80e65ab932.tar.gz cpython-dfcd46769b7a31f42709bba0fb298a80e65ab932.tar.bz2 |
Issue #19390: Argument Clinic no longer accepts malformed Python and C ids.
Diffstat (limited to 'Tools/clinic/clinic_test.py')
-rw-r--r-- | Tools/clinic/clinic_test.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tools/clinic/clinic_test.py b/Tools/clinic/clinic_test.py index 81a0050..7baf380 100644 --- a/Tools/clinic/clinic_test.py +++ b/Tools/clinic/clinic_test.py @@ -560,6 +560,20 @@ Docstring self.assertEqual("Docstring\n\nfoo.bar()", function.docstring) self.assertEqual(0, len(function.parameters)) + def test_illegal_module_line(self): + self.parse_function_should_fail(""" +module foo +foo.bar => int + / +""") + + def test_illegal_c_basename(self): + self.parse_function_should_fail(""" +module foo +foo.bar as 935 + / +""") + def test_single_star(self): self.parse_function_should_fail(""" module foo |