def test_empty_input_list_creates_an_empty_output_list(self):
     vim_mock = VimMockFactory.get_mock(show_origin=1)
     with mock.patch(__name__ + '.localcomplete.vim', vim_mock):
         actual_result = localcomplete.produce_result_value(
                 [], 'testorigin')
     expected_result = []
     self.assertEqual(actual_result, expected_result)
Example #2
0
 def test_empty_input_list_creates_an_empty_output_list(self):
     vim_mock = VimMockFactory.get_mock(show_origin=1)
     with mock.patch(__name__ + '.localcomplete.vim', vim_mock):
         actual_result = localcomplete.produce_result_value([],
                                                            'testorigin')
     expected_result = []
     self.assertEqual(actual_result, expected_result)
 def test_nonempty_without_origin_note(self):
     vim_mock = VimMockFactory.get_mock(show_origin=0)
     with mock.patch(__name__ + '.localcomplete.vim', vim_mock):
         actual_result = localcomplete.produce_result_value(
                 ['1', '2', '3'],
                 'testorigin')
     expected_result = [
              {'word': '1'},
              {'word': '2'},
              {'word': '3'},
              ]
     self.assertEqual(actual_result, expected_result)
Example #4
0
 def test_nonempty_without_origin_note(self):
     vim_mock = VimMockFactory.get_mock(show_origin=0)
     with mock.patch(__name__ + '.localcomplete.vim', vim_mock):
         actual_result = localcomplete.produce_result_value(['1', '2', '3'],
                                                            'testorigin')
     expected_result = [
         {
             'word': '1'
         },
         {
             'word': '2'
         },
         {
             'word': '3'
         },
     ]
     self.assertEqual(actual_result, expected_result)