8000 Add test "allow no more than one vararg" · python/cpython@bbad2bb · GitHub
[go: up one dir, main page]

Skip to content

Commit bbad2bb

Browse files
committed
Add test "allow no more than one vararg"
1 parent 0aa4be4 commit bbad2bb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Lib/test/test_clinic.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,15 @@ def test_parameters_not_permitted_after_slash_for_now(self):
730730
x: int
731731
""")
732732

733+
def test_parameters_no_more_than_one_vararg(self):
734+
s = self.parse_function_should_fail("""
735+
module foo
736+
foo.bar
737+
*vararg1: object
738+
*vararg2: object
739+
""")
740+
self.assertEqual(s, "Error on line 0:\nToo many var args\n")
741+
733742
def test_function_not_at_column_0(self):
734743
function = self.parse_function("""
735744
module foo

0 commit comments

Comments
 (0)
0