diff options
Diffstat (limited to 'tests/run/pep448_extended_unpacking.pyx')
-rw-r--r-- | tests/run/pep448_extended_unpacking.pyx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/run/pep448_extended_unpacking.pyx b/tests/run/pep448_extended_unpacking.pyx index d40a1c6a2..ac3e903a0 100644 --- a/tests/run/pep448_extended_unpacking.pyx +++ b/tests/run/pep448_extended_unpacking.pyx @@ -185,6 +185,24 @@ def unpack_list_literal_mult(): return [*([1, 2, *([4, 5] * 2)] * 3)] +def unpack_list_tuple_mult(): + """ + >>> unpack_list_tuple_mult() + [1, 1] + """ + return [*(1,) * 2] + + +def unpack_list_tuple_bad_mult(): + """ + >>> unpack_list_tuple_bad_mult() # doctest: +ELLIPSIS + Traceback (most recent call last): + ... + TypeError: ... 'float' + """ + return [*(1,) * 1.5] + + @cython.test_fail_if_path_exists( "//ListNode//ListNode", "//MergedSequenceNode", |