Skip to content

Commit 72adc38

Browse files
committed
tests/basics/builtin_enumerate: Add test for many pos args to enumerate.
1 parent 0b88a9f commit 72adc38

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/basics/builtin_enumerate.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,10 @@
1414
print(list(enumerate([1, 2, 3], start=1)))
1515
print(list(enumerate(iterable=[1, 2, 3])))
1616
print(list(enumerate(iterable=[1, 2, 3], start=1)))
17+
18+
# check handling of extra positional args (exercises some logic in mp_arg_parse_all)
19+
# don't print anything because it doesn't error with MICROPY_CPYTHON_COMPAT disabled
20+
try:
21+
enumerate([], 1, 2)
22+
except TypeError:
23+
pass

0 commit comments

Comments
 (0)