Home
last modified time | relevance | path

Searched refs:find_binding (Results 1 – 6 of 6) sorted by relevance

/external/python/cpython2/Lib/lib2to3/tests/
Dtest_util.py110 c = fixer_util.find_binding(name, node)
151 def find_binding(self, name, string, package=None): member in Test_find_binding
152 return fixer_util.find_binding(name, parse(string), package)
155 self.assertTrue(self.find_binding("a", "a = b"))
156 self.assertTrue(self.find_binding("a", "a = [b, c, d]"))
157 self.assertTrue(self.find_binding("a", "a = foo()"))
158 self.assertTrue(self.find_binding("a", "a = foo().foo.foo[6][foo]"))
159 self.assertFalse(self.find_binding("a", "foo = a"))
160 self.assertFalse(self.find_binding("a", "foo = (a, b, c)"))
163 self.assertTrue(self.find_binding("a", "(a,) = b"))
[all …]
/external/python/cpython3/Lib/lib2to3/tests/
Dtest_util.py107 c = fixer_util.find_binding(name, node)
148 def find_binding(self, name, string, package=None): member in Test_find_binding
149 return fixer_util.find_binding(name, parse(string), package)
152 self.assertTrue(self.find_binding("a", "a = b"))
153 self.assertTrue(self.find_binding("a", "a = [b, c, d]"))
154 self.assertTrue(self.find_binding("a", "a = foo()"))
155 self.assertTrue(self.find_binding("a", "a = foo().foo.foo[6][foo]"))
156 self.assertFalse(self.find_binding("a", "foo = a"))
157 self.assertFalse(self.find_binding("a", "foo = (a, b, c)"))
160 self.assertTrue(self.find_binding("a", "(a,) = b"))
[all …]
/external/python/cpython3/Lib/lib2to3/
Dfixer_util.py308 binding = find_binding(name, find_root(node), package)
361 def find_binding(name, node, package=None): function
371 n = find_binding(name, make_suite(child.children[-1]), package)
374 n = find_binding(name, make_suite(child.children[-1]), package)
377 n = find_binding(name, make_suite(child.children[2]), package)
384 n = find_binding(name, make_suite(child.children[i+4]), package)
391 ret = find_binding(name, child, package)
/external/python/cpython2/Lib/lib2to3/
Dfixer_util.py287 binding = find_binding(name, find_root(node), package)
340 def find_binding(name, node, package=None): function
350 n = find_binding(name, make_suite(child.children[-1]), package)
353 n = find_binding(name, make_suite(child.children[-1]), package)
356 n = find_binding(name, make_suite(child.children[2]), package)
363 n = find_binding(name, make_suite(child.children[i+4]), package)
370 ret = find_binding(name, child, package)
/external/python/cpython3/Lib/lib2to3/fixes/
Dfix_next.py12 from ..fixer_util import Name, Call, find_binding
39 n = find_binding('next', tree)
/external/python/cpython2/Lib/lib2to3/fixes/
Dfix_next.py12 from ..fixer_util import Name, Call, find_binding
39 n = find_binding(u'next', tree)