#2492 - Try to fix a bug with ALE's deoplete source

This commit is contained in:
w0rp 2019-05-11 16:40:26 +01:00
parent 79e42fed14
commit f0152bca98
No known key found for this signature in database
GPG Key ID: 0FC1ECAA8C81CD83
2 changed files with 5 additions and 5 deletions

View File

@ -47,4 +47,4 @@ class Source(Base):
# Request some completion results.
self.vim.call('ale#completion#GetCompletions', 'deoplete')
return []
return None

View File

@ -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', ()),