From 72adc381fba1652d41d9c187476177229aeb4ad0 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 8 Mar 2018 12:50:07 +1100 Subject: [PATCH] tests/basics/builtin_enumerate: Add test for many pos args to enumerate. --- tests/basics/builtin_enumerate.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/basics/builtin_enumerate.py b/tests/basics/builtin_enumerate.py index 4f8239bf72..fcbf869767 100644 --- a/tests/basics/builtin_enumerate.py +++ b/tests/basics/builtin_enumerate.py @@ -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