1
1
import sys
2
2
3
3
import pytest
4
- from robot import __version__ as robot__version
4
+ from robot import __version__ as robot_version
5
5
6
6
from robotlibcore import HybridCore , PY2
7
7
from HybridLibrary import HybridLibrary
@@ -99,7 +99,7 @@ def test_getattr():
99
99
"'%s' object has no attribute 'non_existing'" % type (lib ).__name__
100
100
101
101
102
- @pytest .mark .skipif (robot__version >= '3.2' , reason = 'For RF 3.1' )
102
+ @pytest .mark .skipif (robot_version >= '3.2' , reason = 'For RF 3.1' )
103
103
def test_get_keyword_arguments_rf31 ():
104
104
args = DynamicLibrary ().get_keyword_arguments
105
105
assert args ('mandatory' ) == ['arg1' , 'arg2' ]
@@ -112,7 +112,7 @@ def test_get_keyword_arguments_rf31():
112
112
args ('__foobar__' )
113
113
114
114
115
- @pytest .mark .skipif (robot__version < '3.2' , reason = 'For RF 3.2 or greater' )
115
+ @pytest .mark .skipif (robot_version < '3.2' , reason = 'For RF 3.2 or greater' )
116
116
def test_get_keyword_arguments_rf32 ():
117
117
args = DynamicLibrary ().get_keyword_arguments
118
118
assert args ('mandatory' ) == ['arg1' , 'arg2' ]
@@ -126,7 +126,7 @@ def test_get_keyword_arguments_rf32():
126
126
127
127
128
128
@pytest .mark .skipif (PY2 , reason = 'Only for Python 3' )
129
- @pytest .mark .skipif (robot__version < '3.2' , reason = 'For RF 3.2 or greater' )
129
+ @pytest .mark .skipif (robot_version < '3.2' , reason = 'For RF 3.2 or greater' )
130
130
def test_keyword_only_arguments_for_get_keyword_arguments_rf32 ():
131
131
args = DynamicTypesAnnotationsLibrary (1 ).get_keyword_arguments
132
132
assert args ('keyword_only_arguments' ) == ['*varargs' , ('some' , 111 )]
@@ -135,10 +135,11 @@ def test_keyword_only_arguments_for_get_keyword_arguments_rf32():
135
135
assert args ('keyword_only_arguments_default_and_no_default' ) == ['*varargs' , 'other' , ('value' , False )]
136
136
all_args = ['mandatory' , ('positional' , 1 ), '*varargs' , 'other' , ('value' , False ), '**kwargs' ]
137
137
assert args ('keyword_all_args' ) == all_args
138
+ assert args ('keyword_with_deco_and_signature' ) == [('arg1' , False ), ('arg2' , False )]
138
139
139
140
140
141
@pytest .mark .skipif (PY2 , reason = 'Only for Python 3' )
141
- @pytest .mark .skipif (robot__version >= '3.2' , reason = 'For RF 3.1' )
142
+ @pytest .mark .skipif (robot_version >= '3.2' , reason = 'For RF 3.1' )
142
143
def test_keyword_only_arguments_for_get_keyword_arguments_rf31 ():
143
144
args = DynamicTypesAnnotationsLibrary (1 ).get_keyword_arguments
144
145
assert args ('keyword_only_arguments' ) == ['*varargs' , 'some=111' ]
@@ -147,6 +148,7 @@ def test_keyword_only_arguments_for_get_keyword_arguments_rf31():
147
148
assert args ('keyword_only_arguments_default_and_no_default' ) == ['*varargs' , 'other' , 'value=False' ]
148
149
all_args = ['mandatory' , 'positional=1' , '*varargs' , 'other' , 'value=False' , '**kwargs' ]
149
150
assert args ('keyword_all_args' ) == all_args
151
+ assert args ('keyword_with_deco_and_signature' ) == ['arg1=False' , 'arg2=False' ]
150
152
151
153
152
154
def test_get_keyword_documentation ():
0 commit comments