Commit 32b9adc9 authored by Stefan Behnel's avatar Stefan Behnel

test: too few arguments to unpack

parent ecb620b5
...@@ -4,18 +4,27 @@ __doc__ = """ ...@@ -4,18 +4,27 @@ __doc__ = """
>>> unpack_normal([1,2,3]) >>> unpack_normal([1,2,3])
Traceback (most recent call last): Traceback (most recent call last):
ValueError: too many values to unpack ValueError: too many values to unpack
>>> unpack_normal([1])
Traceback (most recent call last):
ValueError: need more than 1 values to unpack
>>> unpack_comp([1,2]) >>> unpack_comp([1,2])
(1, 2) (1, 2)
>>> unpack_comp([1,2,3]) >>> unpack_comp([1,2,3])
Traceback (most recent call last): Traceback (most recent call last):
ValueError: too many values to unpack ValueError: too many values to unpack
>>> unpack_comp([1])
Traceback (most recent call last):
ValueError: need more than 1 values to unpack
>>> unpack_expr([1,2]) >>> unpack_expr([1,2])
(1, 2) (1, 4)
>>> unpack_expr([1,2,3]) >>> unpack_expr([1,2,3])
Traceback (most recent call last): Traceback (most recent call last):
ValueError: too many values to unpack ValueError: too many values to unpack
>>> unpack_expr([1])
Traceback (most recent call last):
ValueError: need more than 1 values to unpack
""" """
def unpack_normal(l): def unpack_normal(l):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment