summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorcpopa <devnull@localhost>2014-07-08 15:24:45 +0300
committercpopa <devnull@localhost>2014-07-08 15:24:45 +0300
commitfac1865c061d62ddd5a8473a6f6d3fed9134d047 (patch)
tree76b90ee28571e0abb4e166b457613800095154a3 /test
parent59accca5013b2fcb4c03eecbd7d5e4a7f3892c1c (diff)
downloadpylint-fac1865c061d62ddd5a8473a6f6d3fed9134d047.tar.gz
Fix a false positive with unbalanced iterable unpacking, when encountering starred nodes. Closes issue #273.
Diffstat (limited to 'test')
-rw-r--r--test/input/func_noerror_unbalanced_tuple_unpacking_py30.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/input/func_noerror_unbalanced_tuple_unpacking_py30.py b/test/input/func_noerror_unbalanced_tuple_unpacking_py30.py
new file mode 100644
index 0000000..68f5fb7
--- /dev/null
+++ b/test/input/func_noerror_unbalanced_tuple_unpacking_py30.py
@@ -0,0 +1,11 @@
+""" Test that using starred nodes in unpacking
+does not trigger a false positive on Python 3.
+"""
+
+__revision__ = 1
+
+def test():
+ """ Test that starred expressions don't give false positives. """
+ first, second, *last = (1, 2, 3, 4)
+ *last, = (1, 2)
+ return (first, second, last)