3
3
from robotremoteserver import RemoteLibraryFactory
4
4
5
5
6
- class OwnArgsAndDocs (object ):
6
+ class OwnArgsDocTags (object ):
7
7
8
8
def get_keyword_names (self ):
9
9
return ['keyword' ]
@@ -17,8 +17,11 @@ def get_keyword_arguments(self, name):
17
17
def get_keyword_documentation (self , name ):
18
18
return 'The doc for %s' % name
19
19
20
+ def get_keyword_tags (self , name ):
21
+ return [name , 'tags' ]
20
22
21
- class OwnArgsAndDocsWithCamelCaseNames (object ):
23
+
24
+ class OwnArgsDocTagsWithCamelCaseNames (object ):
22
25
23
26
def getKeywordNames (self ):
24
27
return ['keyword' ]
@@ -32,8 +35,11 @@ def getKeywordArguments(self, name):
32
35
def getKeywordDocumentation (self , name ):
33
36
return 'The doc for %s' % name
34
37
38
+ def getKeywordTags (self , name ):
39
+ return [name , 'tags' ]
40
+
35
41
36
- class NoArgsOrDocs (object ):
42
+ class NoArgsDocTags (object ):
37
43
38
44
def get_keyword_names (self ):
39
45
return ['keyword' ]
@@ -42,7 +48,7 @@ def run_keyword(self, name, args, kwargs=None):
42
48
pass
43
49
44
50
45
- class NoArgsOrDocsWithoutKwargs (object ):
51
+ class NoArgsDocTagsWithoutKwargs (object ):
46
52
47
53
def get_keyword_names (self ):
48
54
return ['keyword' ]
@@ -51,10 +57,10 @@ def run_keyword(self, name, args):
51
57
pass
52
58
53
59
54
- class TestOwnArgsAndDocs (unittest .TestCase ):
60
+ class TestOwnArgsDocTags (unittest .TestCase ):
55
61
56
62
def setUp (self ):
57
- self .lib = RemoteLibraryFactory (OwnArgsAndDocs ())
63
+ self .lib = RemoteLibraryFactory (OwnArgsDocTags ())
58
64
59
65
def test_arguments (self ):
60
66
self .assertEqual (self .lib .get_keyword_arguments ('keyword' ),
@@ -64,34 +70,36 @@ def test_documentation(self):
64
70
self .assertEqual (self .lib .get_keyword_documentation ('keyword' ),
65
71
'The doc for keyword' )
66
72
73
+ def test_tags (self ):
74
+ self .assertEqual (self .lib .get_keyword_tags ('keyword' ),
75
+ ['keyword' , 'tags' ])
67
76
68
- class TestOwnArgsAndDocsWithCamelCaseNames (TestOwnArgsAndDocs ):
77
+
78
+ class TestOwnArgsDocTagsWithCamelCaseNames (TestOwnArgsDocTags ):
69
79
70
80
def setUp (self ):
71
- self .lib = RemoteLibraryFactory (OwnArgsAndDocsWithCamelCaseNames ())
81
+ self .lib = RemoteLibraryFactory (OwnArgsDocTagsWithCamelCaseNames ())
72
82
73
83
74
- class TestNoArgsOrDocs (unittest .TestCase ):
84
+ class TestNoArgsDocTags (unittest .TestCase ):
75
85
76
86
def setUp (self ):
77
- self .lib = RemoteLibraryFactory (NoArgsOrDocs ())
87
+ self .lib = RemoteLibraryFactory (NoArgsDocTags ())
78
88
79
- def test_arguments (self ):
89
+ def test_arguments_with_kwargs (self ):
80
90
self .assertEqual (self .lib .get_keyword_arguments ('keyword' ),
81
91
['*varargs' , '**kwargs' ])
82
92
93
+ def test_arguments_without_kwargs (self ):
94
+ self .lib = RemoteLibraryFactory (NoArgsDocTagsWithoutKwargs ())
95
+ self .assertEqual (self .lib .get_keyword_arguments ('keyword' ),
96
+ ['*varargs' ])
97
+
83
98
def test_documentation (self ):
84
99
self .assertEqual (self .lib .get_keyword_documentation ('keyword' ), '' )
85
100
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' ), [])
95
103
96
104
97
105
if __name__ == '__main__' :
0 commit comments