From 92da4ca99f60eab419641646613a0810ec3bf564 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 13 Mar 2014 12:49:08 +0100 Subject: [PATCH] tests for call signature param names --- test/test_api/test_call_signatures.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/test_api/test_call_signatures.py b/test/test_api/test_call_signatures.py index 7ebf370f..0b13c0d6 100644 --- a/test/test_api/test_call_signatures.py +++ b/test/test_api/test_call_signatures.py @@ -158,3 +158,16 @@ class TestCallSignatures(TestCase): assert len(signatures) == 1 x = [p.get_code() for p in signatures[0].params] assert x == ['*args\n'] + + +class TestParams(TestCase): + def params(self, source, line=None, column=None): + signatures = Script(source, line, column).call_signatures() + assert len(signatures) == 1 + return signatures[0].params + + def test_param_name(self): + p = self.params('''int(''') + # int is defined as: `int(x[, base])` + assert p[0].name == 'x' + assert p[1].name == 'base'