33from robotremoteserver import RemoteLibraryFactory
44
55
6- class OwnArgsAndDocs (object ):
6+ class OwnArgsDocTags (object ):
77
88 def get_keyword_names (self ):
99 return ['keyword' ]
@@ -17,8 +17,11 @@ def get_keyword_arguments(self, name):
1717 def get_keyword_documentation (self , name ):
1818 return 'The doc for %s' % name
1919
20+ def get_keyword_tags (self , name ):
21+ return [name , 'tags' ]
2022
21- class OwnArgsAndDocsWithCamelCaseNames (object ):
23+
24+ class OwnArgsDocTagsWithCamelCaseNames (object ):
2225
2326 def getKeywordNames (self ):
2427 return ['keyword' ]
@@ -32,8 +35,11 @@ def getKeywordArguments(self, name):
3235 def getKeywordDocumentation (self , name ):
3336 return 'The doc for %s' % name
3437
38+ def getKeywordTags (self , name ):
39+ return [name , 'tags' ]
40+
3541
36- class NoArgsOrDocs (object ):
42+ class NoArgsDocTags (object ):
3743
3844 def get_keyword_names (self ):
3945 return ['keyword' ]
@@ -42,7 +48,7 @@ def run_keyword(self, name, args, kwargs=None):
4248 pass
4349
4450
45- class NoArgsOrDocsWithoutKwargs (object ):
51+ class NoArgsDocTagsWithoutKwargs (object ):
4652
4753 def get_keyword_names (self ):
4854 return ['keyword' ]
@@ -51,10 +57,10 @@ def run_keyword(self, name, args):
5157 pass
5258
5359
54- class TestOwnArgsAndDocs (unittest .TestCase ):
60+ class TestOwnArgsDocTags (unittest .TestCase ):
5561
5662 def setUp (self ):
57- self .lib = RemoteLibraryFactory (OwnArgsAndDocs ())
63+ self .lib = RemoteLibraryFactory (OwnArgsDocTags ())
5864
5965 def test_arguments (self ):
6066 self .assertEqual (self .lib .get_keyword_arguments ('keyword' ),
@@ -64,34 +70,36 @@ def test_documentation(self):
6470 self .assertEqual (self .lib .get_keyword_documentation ('keyword' ),
6571 'The doc for keyword' )
6672
73+ def test_tags (self ):
74+ self .assertEqual (self .lib .get_keyword_tags ('keyword' ),
75+ ['keyword' , 'tags' ])
6776
68- class TestOwnArgsAndDocsWithCamelCaseNames (TestOwnArgsAndDocs ):
77+
78+ class TestOwnArgsDocTagsWithCamelCaseNames (TestOwnArgsDocTags ):
6979
7080 def setUp (self ):
71- self .lib = RemoteLibraryFactory (OwnArgsAndDocsWithCamelCaseNames ())
81+ self .lib = RemoteLibraryFactory (OwnArgsDocTagsWithCamelCaseNames ())
7282
7383
74- class TestNoArgsOrDocs (unittest .TestCase ):
84+ class TestNoArgsDocTags (unittest .TestCase ):
7585
7686 def setUp (self ):
77- self .lib = RemoteLibraryFactory (NoArgsOrDocs ())
87+ self .lib = RemoteLibraryFactory (NoArgsDocTags ())
7888
79- def test_arguments (self ):
89+ def test_arguments_with_kwargs (self ):
8090 self .assertEqual (self .lib .get_keyword_arguments ('keyword' ),
8191 ['*varargs' , '**kwargs' ])
8292
93+ def test_arguments_without_kwargs (self ):
94+ self .lib = RemoteLibraryFactory (NoArgsDocTagsWithoutKwargs ())
95+ self .assertEqual (self .lib .get_keyword_arguments ('keyword' ),
96+ ['*varargs' ])
97+
8398 def test_documentation (self ):
8499 self .assertEqual (self .lib .get_keyword_documentation ('keyword' ), '' )
85100
86-
87- class TestNoArgsOrDocsWithoutKwargs (unittest .TestCase ):
88-
89- def setUp (self ):
90- self .lib = RemoteLibraryFactory (NoArgsOrDocsWithoutKwargs ())
91-
92- def test_arguments (self ):
93- self .assertEqual (self .lib .get_keyword_arguments ('keyword' ),
94- ['*varargs' ])
101+ def test_tags (self ):
102+ self .assertEqual (self .lib .get_keyword_tags ('keyword' ), [])
95103
96104
97105if __name__ == '__main__' :
0 commit comments