diff options
author | Brett Cannon <brett@python.org> | 2015-02-20 11:41:06 -0500 |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2015-02-20 11:41:06 -0500 |
commit | 54a6050954bdf1da363e60a198659c3eb3aa32d4 (patch) | |
tree | 75658d610b5acfefc420a885c569b6f3bd6d85e5 | |
parent | f62e14422ef8600ebfac770d2b83e893f2490477 (diff) | |
download | pylint-54a6050954bdf1da363e60a198659c3eb3aa32d4.tar.gz |
Use __() in tests to extract the node instead of #@ plus some fidgeting
-rw-r--r-- | pylint/test/unittest_checker_python3.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/pylint/test/unittest_checker_python3.py b/pylint/test/unittest_checker_python3.py index 357065a..b07798d 100644 --- a/pylint/test/unittest_checker_python3.py +++ b/pylint/test/unittest_checker_python3.py @@ -98,13 +98,10 @@ class Python3CheckerTest(testutils.CheckerTestCase): checker = '{}-builtin-not-iterating'.format(fxn) node = test_utils.extract_node(""" list( - {}(x) #@ + __({}(x)) for x in [1] ) """.format(fxn)) - # For some reason extract_node won't grab the map() call. - assert isinstance(node, astroid.GenExpr) - node = node.elt message = testutils.Message(checker, node=node) with self.assertAddsMessages(message): self.checker.visit_callfunc(node) @@ -113,11 +110,9 @@ class Python3CheckerTest(testutils.CheckerTestCase): checker = '{}-builtin-not-iterating'.format(fxn) node = test_utils.extract_node(""" [ - {}(None, x) #@ + __({}(None, x)) for x in [[1]]] """.format(fxn)) - # For some reason extract_node won't grab the map() call. - node = node.elt message = testutils.Message(checker, node=node) with self.assertAddsMessages(message): self.checker.visit_callfunc(node) |