diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2017-09-19 13:54:06 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2017-09-19 13:54:06 +0200 |
commit | 3543bbc658947312659fda453aed634d71c29556 (patch) | |
tree | f9f8ba64928a7e11e2f434cd0318f0bc5f05d376 /pylint/test/unittest_checker_python3.py | |
parent | 0ecfbf3b5a196708d3c3f9058890a2ec0cf3aaea (diff) | |
download | pylint-git-3543bbc658947312659fda453aed634d71c29556.tar.gz |
A map enclosed by a filter call does not trigger map-builtin-not-iterating on Python 3 porting checker any longer
Diffstat (limited to 'pylint/test/unittest_checker_python3.py')
-rw-r--r-- | pylint/test/unittest_checker_python3.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pylint/test/unittest_checker_python3.py b/pylint/test/unittest_checker_python3.py index ee464af89..e5d6a9172 100644 --- a/pylint/test/unittest_checker_python3.py +++ b/pylint/test/unittest_checker_python3.py @@ -115,6 +115,11 @@ class TestPython3Checker(testutils.CheckerTestCase): with self.assertNoMessages(): self.walk(module) + def as_argument_to_materialized_filter(self, callable_fn): + module = astroid.parse("list(filter(None, {}()))".format(callable_fn)) + with self.assertNoMessages(): + self.walk(module) + def as_argument_to_random_fxn_test(self, fxn): checker = '{}-builtin-not-iterating'.format(fxn) node = astroid.extract_node(""" @@ -160,6 +165,7 @@ class TestPython3Checker(testutils.CheckerTestCase): self.as_argument_to_str_join_test(fxn) self.as_iterable_in_unpacking(fxn) self.as_assignment(fxn) + self.as_argument_to_materialized_filter(fxn) for func in ('iter', 'list', 'tuple', 'sorted', 'set', 'sum', 'any', 'all', |