diff options
author | w0rp <devw0rp@gmail.com> | 2019-05-11 16:40:26 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2019-05-11 16:40:26 +0100 |
commit | f0152bca987272e257e5dbe39d835c7d8e85b367 (patch) | |
tree | 815334dae041a30efc94da2317b85edb2d3c71bb | |
parent | 79e42fed14b35767d53d7d443a644a037e012b89 (diff) | |
download | ale-f0152bca987272e257e5dbe39d835c7d8e85b367.zip |
#2492 - Try to fix a bug with ALE's deoplete source
-rw-r--r-- | rplugin/python3/deoplete/sources/ale.py | 2 | ||||
-rw-r--r-- | test/python/test_deoplete_source.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/rplugin/python3/deoplete/sources/ale.py b/rplugin/python3/deoplete/sources/ale.py index 1addfae3..55121d76 100644 --- a/rplugin/python3/deoplete/sources/ale.py +++ b/rplugin/python3/deoplete/sources/ale.py @@ -47,4 +47,4 @@ class Source(Base): # Request some completion results. self.vim.call('ale#completion#GetCompletions', 'deoplete') - return [] + return None diff --git a/test/python/test_deoplete_source.py b/test/python/test_deoplete_source.py index 960abe3a..94fa66c2 100644 --- a/test/python/test_deoplete_source.py +++ b/test/python/test_deoplete_source.py @@ -59,7 +59,7 @@ class DeopleteSourceTest(unittest.TestCase): def test_request_completion_results(self): context = {'is_async': False} - self.assertEqual(self.source.gather_candidates(context), []) + self.assertIsNone(self.source.gather_candidates(context)) self.assertEqual(context, {'is_async': True}) self.assertEqual(self.call_list, [ ('ale#completion#GetCompletions', ('deoplete',)), @@ -68,7 +68,7 @@ class DeopleteSourceTest(unittest.TestCase): def test_refresh_completion_results(self): context = {'is_async': False} - self.assertEqual(self.source.gather_candidates(context), []) + self.assertIsNone(self.source.gather_candidates(context)) self.assertEqual(context, {'is_async': True}) self.assertEqual(self.call_list, [ ('ale#completion#GetCompletions', ('deoplete',)), @@ -76,7 +76,7 @@ class DeopleteSourceTest(unittest.TestCase): context = {'is_async': True, 'is_refresh': True} - self.assertEqual(self.source.gather_candidates(context), []) + self.assertIsNone(self.source.gather_candidates(context)) self.assertEqual(context, {'is_async': True, 'is_refresh': True}) self.assertEqual(self.call_list, [ ('ale#completion#GetCompletions', ('deoplete',)), @@ -87,7 +87,7 @@ class DeopleteSourceTest(unittest.TestCase): context = {'is_async': True} self.call_results['ale#completion#GetCompletionResult'] = None - self.assertEqual(self.source.gather_candidates(context), []) + self.assertIsNone(self.source.gather_candidates(context)) self.assertEqual(context, {'is_async': True}) self.assertEqual(self.call_list, [ ('ale#completion#GetCompletionResult', ()), |