From 4626a8b6df77c4132662d2a36e7a0e9f17c8a74e Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 18 Jul 2014 15:23:47 +0200 Subject: [PATCH] test for #417 --- test/test_api/test_call_signatures.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/test_api/test_call_signatures.py b/test/test_api/test_call_signatures.py index bb049a9d..faf72b3d 100644 --- a/test/test_api/test_call_signatures.py +++ b/test/test_api/test_call_signatures.py @@ -227,6 +227,23 @@ def test_no_signature(): assert len(Script(s, column=2).call_signatures()) == 1 +def test_dicts(): + source = """\ + import json + + def foo(): + json.loads( + + json.load.return_value = {'foo': [], + 'bar': True} + + c = Foo() + """ + + script = Script(dedent(source), line=4, column=15) + assert script.call_signatures() + + def test_completion_interference(): """Seems to cause problems, see also #396.""" cache.parser_cache.pop(None, None)