diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-10-04 18:20:10 +0300 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-10-04 18:20:10 +0300 |
commit | 48f89e053b0b91d5cc1a1401a5b871815e4bcf9e (patch) | |
tree | 7a92a93fc2567b08d09aeaa6795e2227e7712de1 | |
parent | b6d09b3c12fcf250e9d00b386bc04c5e8b8b3372 (diff) | |
parent | 048e86c40eb68908b74dcfd5512a602a24da9ef9 (diff) | |
download | pylint-48f89e053b0b91d5cc1a1401a5b871815e4bcf9e.tar.gz |
Merged in cezarelnazli/pylint (pull request #281)
Add functional tests for PEP 448
3 files changed, 12 insertions, 0 deletions
diff --git a/pylint/test/functional/star_needs_assignment_target_py35.py b/pylint/test/functional/star_needs_assignment_target_py35.py new file mode 100644 index 0000000..d2801de --- /dev/null +++ b/pylint/test/functional/star_needs_assignment_target_py35.py @@ -0,0 +1,10 @@ +""" +Test PEP 0448 -- Additional Unpacking Generalizations +https://www.python.org/dev/peps/pep-0448/ +""" +UNPACK_TUPLE = (*range(4), 4) +UNPACK_LIST = [*range(4), 4] +UNPACK_SET = {*range(4), 4} +UNPACK_DICT = {'a': 1, **{'b': '2'}} +UNPACK_DICT2 = {**UNPACK_DICT, "x": 1, "y": 2} +UNPACK_DICT3 = {**{'a': 1}, 'a': 2, **{'a': 3}} diff --git a/pylint/test/functional/star_needs_assignment_target_py35.rc b/pylint/test/functional/star_needs_assignment_target_py35.rc new file mode 100644 index 0000000..71de8b6 --- /dev/null +++ b/pylint/test/functional/star_needs_assignment_target_py35.rc @@ -0,0 +1,2 @@ +[testoptions] +min_pyver=3.5 diff --git a/pylint/test/functional/star_needs_assignment_target_py35.txt b/pylint/test/functional/star_needs_assignment_target_py35.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/pylint/test/functional/star_needs_assignment_target_py35.txt |