diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-09-27 03:38:55 +0300 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-09-27 03:38:55 +0300 |
commit | cfe8e1edc24a818d5192b938941cabe029e455a4 (patch) | |
tree | 72168a75e08559d547c82858ed54686210253ce3 /astroid | |
parent | 09939d50c7f54bcb7ed6623231989cc69787da04 (diff) | |
download | astroid-cfe8e1edc24a818d5192b938941cabe029e455a4.tar.gz |
Add test for issue #183.
Diffstat (limited to 'astroid')
-rw-r--r-- | astroid/tests/unittest_nodes.py | 9 |
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)) #@ |