summaryrefslogtreecommitdiff
path: root/astroid
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-09-27 03:38:55 +0300
committerClaudiu Popa <pcmanticore@gmail.com>2015-09-27 03:38:55 +0300
commitcfe8e1edc24a818d5192b938941cabe029e455a4 (patch)
tree72168a75e08559d547c82858ed54686210253ce3 /astroid
parent09939d50c7f54bcb7ed6623231989cc69787da04 (diff)
downloadastroid-cfe8e1edc24a818d5192b938941cabe029e455a4.tar.gz
Add test for issue #183.
Diffstat (limited to 'astroid')
-rw-r--r--astroid/tests/unittest_nodes.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/astroid/tests/unittest_nodes.py b/astroid/tests/unittest_nodes.py
index eb21073..ade8a92 100644
--- a/astroid/tests/unittest_nodes.py
+++ b/astroid/tests/unittest_nodes.py
@@ -53,6 +53,15 @@ class AsStringTest(resources.SysPathSetup, unittest.TestCase):
self.assertEqual(build('(1, )').as_string(), '(1, )')
self.assertEqual(build('1, 2, 3').as_string(), '(1, 2, 3)')
+ @test_utils.require_version(minver='3.0')
+ def test_func_signature_issue_185(self):
+ code = textwrap.dedent('''
+ def test(a, b, c=42, *, x=42, **kwargs):
+ print(a, b, c, args)
+ ''')
+ node = parse(code)
+ self.assertEqual(node.as_string().strip(), code.strip())
+
def test_frozenset_as_string(self):
nodes = test_utils.extract_node('''
frozenset((1, 2, 3)) #@