summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2000-10-12 14:45:58 (GMT)
committerBarry Warsaw <barry@python.org>2000-10-12 14:45:58 (GMT)
commit0157e7aa3e4448e00f8a99aac0e2e4f03de9df17 (patch)
treeabf0b646d83a930d947f31739567111dea39af28 /Lib
parentcb5b5bac11165e8bca4f518c8de8ebfa96601e14 (diff)
downloadcpython-0157e7aa3e4448e00f8a99aac0e2e4f03de9df17.zip
cpython-0157e7aa3e4448e00f8a99aac0e2e4f03de9df17.tar.gz
cpython-0157e7aa3e4448e00f8a99aac0e2e4f03de9df17.tar.bz2
Added some single tuple/list unpacking for JPython regression testing.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_unpack.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_unpack.py b/Lib/test/test_unpack.py
index 25324c0..25b94e9 100644
--- a/Lib/test/test_unpack.py
+++ b/Lib/test/test_unpack.py
@@ -47,6 +47,18 @@ a, b, c = Seq()
if a <> 0 or b <> 1 or c <> 2:
raise TestFailed
+# single element unpacking, with extra syntax
+if verbose:
+ print 'unpack single tuple/list'
+st = (99,)
+sl = [100]
+a, = st
+if a <> 99:
+ raise TestFailed
+b, = sl
+if b <> 100:
+ raise TestFailed
+
# now for some failures
# unpacking non-sequence