diff options
author | delphinus <me@delphinus.dev> | 2019-06-19 15:25:58 +0900 |
---|---|---|
committer | delphinus <me@delphinus.dev> | 2019-06-19 15:34:53 +0900 |
commit | 4e1c46947dca552d86cd49a80714237801e01998 (patch) | |
tree | 212ee23e846845b62f814c6cce7ec523e1ea44d4 /test/python/test_deoplete_source.py | |
parent | e0f8304860a8db06bca3ec8cdbd58f3852e5e789 (diff) | |
download | ale-4e1c46947dca552d86cd49a80714237801e01998.zip |
Add & fix tests for added funcs
Diffstat (limited to 'test/python/test_deoplete_source.py')
-rw-r--r-- | test/python/test_deoplete_source.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/python/test_deoplete_source.py b/test/python/test_deoplete_source.py index 1462f77d..d219eef1 100644 --- a/test/python/test_deoplete_source.py +++ b/test/python/test_deoplete_source.py @@ -41,6 +41,7 @@ class DeopleteSourceTest(unittest.TestCase): ) self.assertEqual(attributes, { + 'input_pattern': r'(\.|::|->)\w*$', 'is_bytepos': True, 'mark': '[L]', 'min_pattern_length': 1, @@ -48,12 +49,13 @@ class DeopleteSourceTest(unittest.TestCase): 'rank': 1000, }) - def test_completion_position(self): - self.call_results['ale#completion#GetCompletionPosition'] = 2 + def test_complete_position(self): + self.call_results['ale#completion#GetCompletionPositionForDeoplete'] = 2 + context = {'input': 'foo'} - self.assertEqual(self.source.get_completion_position(), 2) + self.assertEqual(self.source.get_complete_position(context), 2) self.assertEqual(self.call_list, [ - ('ale#completion#GetCompletionPosition', ()), + ('ale#completion#GetCompletionPositionForDeoplete', ('foo',)), ]) def test_request_completion_results(self): |