mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-107609: Fix duplicate module check in Argument Clinic (#107610)
Also remove duplicate module def from _testcapi.
This commit is contained in:
parent
e52e87c349
commit
a443c310ac
4 changed files with 15 additions and 3 deletions
|
@ -416,6 +416,16 @@ class ClinicWholeFileTest(TestCase):
|
|||
"""
|
||||
self.expect_failure(block, err, lineno=8)
|
||||
|
||||
def test_module_already_got_one(self):
|
||||
err = "Already defined module 'm'!"
|
||||
block = """
|
||||
/*[clinic input]
|
||||
module m
|
||||
module m
|
||||
[clinic start generated code]*/
|
||||
"""
|
||||
self.expect_failure(block, err, lineno=3)
|
||||
|
||||
|
||||
class ClinicGroupPermuterTest(TestCase):
|
||||
def _test(self, l, m, r, output):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue