def test_get_kw_completion_list_structure_with_object(self):
     object_name = 'test_a'
     prefix = 'test'
     kw = 'Test A Keyword'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix, RF_CELL,
                                       object_name, False)
     expected = [('{0}\t{1}'.format(kw, object_name), '{0}'.format(kw))]
     self.assertEqual(kw_tuple, expected)
     object_name = 'LibNoClass'
     prefix = 'librarykeyword'
     kw1 = 'Library Keyword 1'
     kw2 = 'Library Keyword 2'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix, RF_CELL,
                                       object_name, False)
     expected = [
         ('{0}\t{1}'.format(kw1, object_name),
          '{0}{1}arg1'.format(kw1, '\n...' + RF_CELL)),
         ('{0}\t{1}'.format(kw2, object_name),
          '{0}{1}arg1{1}arg2'.format(kw2, '\n...' + RF_CELL)),
     ]
     self.assertEqual(kw_tuple, expected)
     object_name = 'BuiltIn'
     prefix = 'lo'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix, RF_CELL,
                                       object_name, False)
     for completion in kw_tuple:
         self.assertRegexpMatches(completion[0], object_name)
 def test_get_kw_completion_list_structure(self):
     prefix = 'Run'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix,
                                       RF_CELL, None, False)
     kw = 'Run Keyword And Expect Error'
     expected = (
         '{0}\tBuiltIn'.format(kw),
         '{0}{1}expected_error{1}name{1}*args'.format(kw, '\n...' + RF_CELL)
     )
     self.assertEqual(kw_tuple[0], expected)
     kw = 'Run And Return Rc'
     expected = (
         '{0}\tOperatingSystem'.format(kw),
         '{0}{1}command'.format(kw, '\n...' + RF_CELL))
     self.assertEqual(kw_tuple[-1], expected)
     kw_tuple = get_kw_completion_list(self.test_b_index, 'Embedding',
                                       RF_CELL, None, False)
     expected = (
         'Embedding ${arg} To Keyword Name\tresource_b',
         'Embedding \\${arg} To Keyword Name'
     )
     self.assertEqual(kw_tuple[0], expected)
     kw_tuple = get_kw_completion_list(self.test_b_index, 'Embedding',
                                       RF_CELL, None, True)
     self.assertEqual(kw_tuple[0], expected)
     self.assertEqual(len(kw_tuple), 1)
 def test_get_kw_completion_list_structure_with_object(self):
     object_name = 'test_a'
     prefix = 'test'
     kw = 'Test A Keyword'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix,
                                       RF_CELL, object_name, False)
     expected = [(
         '{0}\t{1}'.format(kw, object_name),
         '{0}'.format(kw)
     )]
     self.assertEqual(kw_tuple, expected)
     object_name = 'LibNoClass'
     prefix = 'librarykeyword'
     kw1 = 'Library Keyword 1'
     kw2 = 'Library Keyword 2'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix,
                                       RF_CELL, object_name, False)
     expected = [
         (
             '{0}\t{1}'.format(kw1, object_name),
             '{0}{1}arg1'.format(kw1, '\n...' + RF_CELL)
         ),
         (
             '{0}\t{1}'.format(kw2, object_name),
             '{0}{1}arg1{1}arg2'.format(kw2, '\n...' + RF_CELL)
         ),
     ]
     self.assertEqual(kw_tuple, expected)
     object_name = 'BuiltIn'
     prefix = 'lo'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix,
                                       RF_CELL, object_name, False)
     for completion in kw_tuple:
         self.assertRegexpMatches(completion[0], object_name)
 def test_get_kw_completion_list_structure(self):
     prefix = 'Run'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix,
                                       RF_CELL, None, False)
     kw = 'Run Keyword And Expect Error'
     expected = (
         '{0}\tBuiltIn'.format(kw),
         '{0}{1}expected_error{1}name{1}*args'.format(kw, '\n...' + RF_CELL)
     )
     self.assertEqual(kw_tuple[0], expected)
     kw = 'Run And Return Rc'
     expected = (
         '{0}\tOperatingSystem'.format(kw),
         '{0}{1}command'.format(kw, '\n...' + RF_CELL))
     self.assertEqual(kw_tuple[-1], expected)
     kw_tuple = get_kw_completion_list(self.test_b_index, 'Embedding',
                                       RF_CELL, None, False)
     expected = (
         'Embedding ${arg} To Keyword Name\tresource_b',
         'Embedding \\${arg} To Keyword Name'
     )
     self.assertEqual(kw_tuple[0], expected)
     kw_tuple = get_kw_completion_list(self.test_b_index, 'Embedding',
                                       RF_CELL, None, True)
     self.assertEqual(kw_tuple[0], expected)
     self.assertEqual(len(kw_tuple), 1)
 def test_get_kw_completion_list_count(self):
     prefix = 'Run'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix,
                                       RF_CELL, None, False)
     self.assertEqual(len(kw_tuple), 40)
     prefix = 'RunKeY'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix,
                                       RF_CELL, None, False)
     self.assertEqual(len(kw_tuple), 20)
     prefix = 'BUI'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix,
                                       RF_CELL, None, False)
     self.assertEqual(len(kw_tuple), 13)
Example #6
0
 def test_get_kw_completion_list_count(self):
     prefix = 'Run'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix, RF_CELL,
                                       None, False)
     self.assertEqual(len(kw_tuple), 70)
     prefix = 'RunKeY'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix, RF_CELL,
                                       None, False)
     self.assertEqual(len(kw_tuple), 21)
     prefix = 'BUI'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix, RF_CELL,
                                       None, False)
     self.assertEqual(len(kw_tuple), 24)
 def test_get_kw_completion_list_count(self):
     prefix = 'Run'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix, RF_CELL,
                                       None, RF_EXTENSION, False)
     self.assertEqual(len(kw_tuple), 39)
     prefix = 'RunKeY'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix, RF_CELL,
                                       None, RF_EXTENSION, False)
     self.assertEqual(len(kw_tuple), 19)
     prefix = 'BUI'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix, RF_CELL,
                                       None, RF_EXTENSION, False)
     self.assertEqual(len(kw_tuple), 13)
 def test_get_kw_completion_list_structure_with_object(self):
     object_name = 'test_a'
     prefix = 'test'
     kw = 'Test A Keyword'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix, RF_CELL,
                                       object_name, RF_EXTENSION, False)
     expected = [('{0}\t{1}'.format(kw, object_name), '{0}'.format(kw))]
     self.assertEqual(kw_tuple, expected)
Example #9
0
 def test_get_kw_completion_list_structure(self):
     prefix = 'Run'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix, RF_CELL,
                                       None, False)
     kw = 'Get Table Row Count'
     expected = ('{0}\tSwingLibrary'.format(kw),
                 '{0}{1}identifier'.format(kw, '\n...' + RF_CELL))
     self.assertEqual(kw_tuple[0], expected)
     kw = 'Run And Return Rc'
     expected = ('{0}\tOperatingSystem'.format(kw),
                 '{0}{1}command'.format(kw, '\n...' + RF_CELL))
     self.assertEqual(kw_tuple[-1], expected)
 def test_get_kw_completion_list_structure_with_object(self):
     object_name = 'test_a'
     prefix = 'test'
     kw = 'Test A Keyword'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix,
                                       RF_CELL, object_name, RF_EXTENSION,
                                       False)
     expected = [(
         '{0}\t{1}'.format(kw, object_name),
         '{0}'.format(kw)
     )]
     self.assertEqual(kw_tuple, expected)
 def test_get_kw_completion_list_structure(self):
     prefix = 'Run'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix, RF_CELL,
                                       None, RF_EXTENSION, False)
     kw = 'Run Keyword And Expect Error'
     expected = ('{0}\tBuiltIn'.format(kw),
                 '{0}{1}expected_error{1}name{1}*args'.format(
                     kw, '\n...' + RF_CELL))
     self.assertEqual(kw_tuple[0], expected)
     kw = 'Run And Return Rc'
     expected = ('{0}\tOperatingSystem'.format(kw),
                 '{0}{1}command'.format(kw, '\n...' + RF_CELL))
     self.assertEqual(kw_tuple[-1], expected)
 def test_get_kw_completion_list_structure(self):
     prefix = 'Run'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix,
                                       RF_CELL, None, RF_EXTENSION, False)
     kw = 'Run Keyword And Expect Error'
     expected = (
         '{0}\tBuiltIn'.format(kw),
         '{0}{1}expected_error{1}name{1}*args'.format(kw, '\n...' + RF_CELL)
     )
     self.assertEqual(kw_tuple[0], expected)
     kw = 'Run And Return Rc'
     expected = (
         '{0}\tOperatingSystem'.format(kw),
         '{0}{1}command'.format(kw, '\n...' + RF_CELL))
     self.assertEqual(kw_tuple[-1], expected)
 def test_get_kw_completion_list_structure(self):
     prefix = 'Run'
     kw_tuple = get_kw_completion_list(self.test_a_index, prefix,
                                       RF_CELL, None, False)
     kw = 'Get Table Row Count'
     expected = (
         '{0}\tSwingLibrary'.format(kw),
         '{0}{1}identifier'.format(kw, '\n...' + RF_CELL)
     )
     self.assertEqual(kw_tuple[0], expected)
     kw = 'Run And Return Rc'
     expected = (
         '{0}\tOperatingSystem'.format(kw),
         '{0}{1}command'.format(kw, '\n...' + RF_CELL))
     self.assertEqual(kw_tuple[-1], expected)