11*** Settings ***
2- Library DynamicTypesLibrary.py
3- Library DynamicTypesAnnotationsLibrary.py xxx
4- Suite Setup Import DynamicTypesAnnotationsLibrary In Python 3 Only
2+ Library DynamicTypesLibrary.py
3+ Library DynamicTypesAnnotationsLibrary.py xxx
54
65*** Test Cases ***
76Keyword Default Argument As Abject None
@@ -17,60 +16,51 @@ Keyword Default Argument As String None
1716 Should Match Regexp ${return } None: <(class|type) '(unicode|str|NoneType)'>
1817
1918Keyword Default As Booleans With Defaults
20- ${return } DynamicTypesLibrary.Keyword Booleans
19+ ${return } = DynamicTypesLibrary.Keyword Booleans
2120 Should Match Regexp ${return } True: <(class|type) 'bool'>, False: <(class|type) 'bool'>
2221
2322Keyword Default As Booleans With Objects
2423 ${return } = DynamicTypesLibrary.Keyword Booleans ${False } ${True }
2524 Should Match Regexp ${return } False: <(class|type) 'bool'>, True: <(class|type) 'bool'>
2625
2726Keyword Annonations And Bool Defaults Using Default
28- [Tags] py3
2927 ${return } = DynamicTypesAnnotationsLibrary.Keyword Default And Annotation 42
3028 Should Match Regexp ${return } 42 : <(class|type) 'int'>, False: <(class|type) 'bool'>
3129
3230Keyword Annonations And Bool Defaults Defining All Arguments
33- [Tags] py3
3431 ${return } = DynamicTypesAnnotationsLibrary.Keyword Default And Annotation 1 true
3532 Should Match Regexp ${return } 1 : <(class|type) 'int'>, true: <(class|type) 'str'>
3633
3734Keyword Annonations And Bool Defaults Defining All Arguments And With Number
38- [Tags] py3
3935 ${return } = DynamicTypesAnnotationsLibrary.Keyword Default And Annotation ${1 } true
4036 Should Match Regexp ${return } 1 : <(class|type) 'int'>, true: <(class|type) 'str'>
4137
4238Keyword Annonations And Robot Types Disbales Argument Conversion
43- [Tags] py3
4439 ${return } = DynamicTypesAnnotationsLibrary.Keyword Robot Types Disabled And Annotations 111
4540 Should Match Regexp ${return } 111 : <(class|type) 'str'>
4641
4742Keyword Annonations And Keyword Only Arguments
48- [Tags] py3
4943 ${return } = DynamicTypesAnnotationsLibrary.Keyword Only Arguments 1 ${1 } some=222
5044 Should Match Regexp ${return } \\('1 ', 1\\): <class 'tuple'>, 222: <class '(int|str)'>
5145
5246Keyword Only Arguments Without VarArg
53- [Tags] py3
5447 ${return } = DynamicTypesAnnotationsLibrary.Keyword Only Arguments No Vararg other=tidii
5548 Should Match ${return } tidii: <class 'str'>
5649
5750Varargs and KeywordArgs With Typing Hints
58- [Tags] py3
5951 ${return } = DynamicTypesAnnotationsLibrary.Keyword Self And Keyword Only Types
6052 ... this_is_mandatory # mandatory argument
61- ... 1 2 3 4 # varargs
62- ... other=True # other argument
63- ... key1=1 key2=2 # kwargs
64- Should Match ${return }
53+ ... 1 2 3 4 # varargs
54+ ... other=True # other argument
55+ ... key1=1 key2=2 # kwargs
56+ Should Match ${return }
6557 ... this_is_mandatory: <class 'str'>, (1, 2, 3, 4): <class 'tuple'>, True: <class 'bool'>, {'key1': 1, 'key2': 2}: <class 'dict'>
6658
6759Enum Conversion Should Work
68- [Tags] py3
6960 ${value } = Enum Conversion ok
7061 Should Match OK penum.ok ${value }
7162
7263Enum Conversion To Invalid Value Should Fail
73- [Tags] py3
7464 Run Keyword And Expect Error ValueError: Argument 'param' got value 'not ok' that*
7565 ... Enum Conversion not ok
7666
@@ -84,9 +74,3 @@ Type Conversion With Optional And None
8474 ${types } = Keyword Optional With None ${None }
8575 Should Contain ${types } arg: None,
8676 Should Contain ${types } <class 'NoneType'>
87-
88- *** Keywords ***
89- Import DynamicTypesAnnotationsLibrary In Python 3 Only
90- ${py3 } = DynamicTypesLibrary.Is Python 3
91- Run Keyword If ${py3 }
92- ... Import Library DynamicTypesAnnotationsLibrary.py Dummy
0 commit comments