You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
tests/basics/builtin_enumerate: Add test for many pos args to enumerate.
This commit is contained in:
@@ -14,3 +14,10 @@ print(list(enumerate(range(100))))
|
||||
print(list(enumerate([1, 2, 3], start=1)))
|
||||
print(list(enumerate(iterable=[1, 2, 3])))
|
||||
print(list(enumerate(iterable=[1, 2, 3], start=1)))
|
||||
|
||||
# check handling of extra positional args (exercises some logic in mp_arg_parse_all)
|
||||
# don't print anything because it doesn't error with MICROPY_CPYTHON_COMPAT disabled
|
||||
try:
|
||||
enumerate([], 1, 2)
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user