11import pytest
22
3- from robotlibcore import RF31 , KeywordBuilder
3+ from robotlibcore import KeywordBuilder
44from moc_library import MockLibrary
55from DynamicTypesAnnotationsLibrary import DynamicTypesAnnotationsLibrary
66
@@ -32,52 +32,31 @@ def test_positional_args(lib):
3232 assert spec .argument_specification == ['arg1' , 'arg2' ]
3333
3434
35- @pytest .mark .skipif (RF31 , reason = 'Only for RF3.2+' )
36- def test_positional_and_named_rf32 (lib ):
35+ def test_positional_and_named (lib ):
3736 spec = KeywordBuilder .build (lib .positional_and_default )
3837 assert spec .argument_specification == ['arg1' , 'arg2' , ('named1' , 'string1' ), ('named2' , 123 )]
3938
4039
41- @pytest .mark .skipif (not RF31 , reason = 'Only for RF3.1' )
42- def test_positional_and_named_rf31 (lib ):
43- spec = KeywordBuilder .build (lib .positional_and_default )
44- assert spec .argument_specification == ['arg1' , 'arg2' , 'named1=string1' , 'named2=123' ]
45-
46-
47- @pytest .mark .skipif (RF31 , reason = 'Only for RF3.2+' )
48- def test_named_only_rf32 (lib ):
40+ def test_named_only (lib ):
4941 spec = KeywordBuilder .build (lib .default_only )
5042 assert spec .argument_specification == [('named1' , 'string1' ), ('named2' , 123 )]
5143
5244
53- @pytest .mark .skipif (not RF31 , reason = 'Only for RF3.1' )
54- def test_named_only_rf31 (lib ):
55- spec = KeywordBuilder .build (lib .default_only )
56- assert spec .argument_specification == ['named1=string1' , 'named2=123' ]
57-
58-
5945def test_varargs_and_kwargs (lib ):
6046 spec = KeywordBuilder .build (lib .varargs_kwargs )
6147 assert spec .argument_specification == ['*vargs' , '**kwargs' ]
6248
6349
64- def test_named_only (lib ):
50+ def test_named_only_part2 (lib ):
6551 spec = KeywordBuilder .build (lib .named_only )
6652 assert spec .argument_specification == ['*varargs' , 'key1' , 'key2' ]
6753
6854
69- @pytest .mark .skipif (RF31 , reason = 'Only for RF3.2+' )
70- def test_named_only_rf32 (lib ):
55+ def test_named_only (lib ):
7156 spec = KeywordBuilder .build (lib .named_only_with_defaults )
7257 assert spec .argument_specification == ['*varargs' , 'key1' , 'key2' , ('key3' , 'default1' ), ('key4' , True )]
7358
7459
75- @pytest .mark .skipif (not RF31 , reason = 'Only for RF3.1' )
76- def test_named_only_rf31 (lib ):
77- spec = KeywordBuilder .build (lib .named_only_with_defaults )
78- assert spec .argument_specification == ['*varargs' , 'key1' , 'key2' , 'key3=default1' , 'key4=True' ]
79-
80-
8160def test_types_in_keyword_deco (lib ):
8261 spec = KeywordBuilder .build (lib .positional_args )
8362 assert spec .argument_types == {'arg1' : str , 'arg2' : int }
@@ -103,17 +82,8 @@ def test_optional_none(lib):
10382 assert spec .argument_types == {'arg1' : str , 'arg2' : str }
10483
10584
106- @pytest .mark .skipif (RF31 , reason = 'For RF 3.2' )
107- def test_complex_deco_rf32 (dyn_types ):
85+ def test_complex_deco (dyn_types ):
10886 spec = KeywordBuilder .build (dyn_types .keyword_with_deco_and_signature )
10987 assert spec .argument_types == {'arg1' : bool , 'arg2' : bool }
11088 assert spec .argument_specification == [('arg1' , False ), ('arg2' , False )]
11189 assert spec .documentation == "Test me doc here"
112-
113-
114- @pytest .mark .skipif (not RF31 , reason = 'For RF 3.2' )
115- def test_complex_deco_rf31 (dyn_types ):
116- spec = KeywordBuilder .build (dyn_types .keyword_with_deco_and_signature )
117- assert spec .argument_types == {'arg1' : bool , 'arg2' : bool }
118- assert spec .argument_specification == ['arg1=False' , 'arg2=False' ]
119- assert spec .documentation == "Test me doc here"
0 commit comments