summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSylvain Thénault <sylvain.thenault@logilab.fr>2009-03-18 09:31:14 +0100
committerSylvain Thénault <sylvain.thenault@logilab.fr>2009-03-18 09:31:14 +0100
commit7bc1c0efee0f361fcd7d2042a440ba5fecb67f2a (patch)
tree0915ec85c6dc66e2c5427c980c8c975335f169d4 /test
parentdca3244ac7681fff5246af523deb0e8bbd848b04 (diff)
downloadastroid-git-7bc1c0efee0f361fcd7d2042a440ba5fecb67f2a.tar.gz
test and fix Function.argnames
--HG-- branch : _ast_compat
Diffstat (limited to 'test')
-rw-r--r--test/unittest_scoped_nodes.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unittest_scoped_nodes.py b/test/unittest_scoped_nodes.py
index 00654327..0529e0e9 100644
--- a/test/unittest_scoped_nodes.py
+++ b/test/unittest_scoped_nodes.py
@@ -181,6 +181,11 @@ def f():
g = list(astng['f'].ilookup('g'))[0]
self.failUnlessEqual(g.pytype(), '__builtin__.function')
+ def test_argnames(self):
+ code = 'def f(a, (b, c), *args, **kwargs): pass'
+ astng = abuilder.string_build(code, __name__, __file__)
+ self.assertEquals(astng['f'].argnames(), ['a', 'b', 'c', 'args', 'kwargs'])
+
class ClassNodeTC(TestCase):