From 42f72b219bc5aca6b67ea2bbadf10d4144e9f350 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Tue, 9 Jul 2019 00:16:53 -0700 Subject: [PATCH] Test both closing brackets and non-closing brackets for CallSignature.index --- test/test_api/test_call_signatures.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test_api/test_call_signatures.py b/test/test_api/test_call_signatures.py index dcd36a6e..eaf2d40b 100644 --- a/test/test_api/test_call_signatures.py +++ b/test/test_api/test_call_signatures.py @@ -486,9 +486,10 @@ _calls = [ ] +@pytest.mark.parametrize('ending', ['', ')']) @pytest.mark.parametrize('code, call, expected_index', _calls) -def test_signature_index(skip_pre_python38, Script, code, call, expected_index): - sig, = Script(code + '\n' + call).call_signatures() +def test_signature_index(skip_pre_python38, Script, code, call, expected_index, ending): + sig, = Script(code + '\n' + call + ending, column=len(call)).call_signatures() index = sig.index assert expected_index == index