@@ -33,7 +33,7 @@ def test_types_disabled(lib):
3333
3434def test_keyword_types_and_bool_default (lib ):
3535 types = lib .get_keyword_types ('keyword_robot_types_and_bool_default' )
36- assert types == {'arg1' : str , 'arg2' : bool }
36+ assert types == {'arg1' : str }
3737
3838
3939def test_one_keyword_type_defined (lib ):
@@ -51,14 +51,9 @@ def test_not_keyword(lib):
5151 lib .get_keyword_types ('not_keyword' )
5252
5353
54- def test_keyword_booleans (lib ):
55- types = lib .get_keyword_types ('keyword_booleans' )
56- assert types == {'arg1' : bool , 'arg2' : bool }
57-
58-
5954def test_keyword_none (lib ):
6055 types = lib .get_keyword_types ('keyword_none' )
61- assert types == {'arg' : type ( None ) }
56+ assert types == {}
6257
6358
6459@pytest .mark .skipif (PY2 , reason = 'Only applicable on Python 3' )
@@ -79,11 +74,6 @@ def test_multiple_types(lib_types):
7974 assert types == {'arg' : Union [List , None ]}
8075
8176
82- def test_keyword_with_default_type (lib ):
83- types = lib .get_keyword_types ('keyword_default_types' )
84- assert types == {'arg' : type (None )}
85-
86-
8777@pytest .mark .skipif (PY2 , reason = 'Only applicable on Python 3' )
8878def test_keyword_new_type (lib_types ):
8979 types = lib_types .get_keyword_types ('keyword_new_type' )
@@ -123,7 +113,7 @@ def test_keyword_with_annotation_external_class(lib_types):
123113@pytest .mark .skipif (PY2 , reason = 'Only applicable on Python 3' )
124114def test_keyword_with_annotation_and_default (lib_types ):
125115 types = lib_types .get_keyword_types ('keyword_default_and_annotation' )
126- assert types == {'arg1' : int , 'arg2' : bool }
116+ assert types == {'arg1' : int , 'arg2' : Union [ bool , str ] }
127117
128118
129119@pytest .mark .skipif (PY2 , reason = 'Only applicable on Python 3' )
@@ -140,13 +130,13 @@ def test_keyword_with_robot_types_disbaled_and_annotations(lib_types):
140130
141131@pytest .mark .skipif (PY2 , reason = 'Only applicable on Python 3' )
142132def test_keyword_with_robot_types_and_bool_annotations (lib_types ):
143- types = lib_types .get_keyword_types ('keyword_robot_types_and_bool_defaults' )
144- assert types == {'arg1' : str , 'arg2' : bool }
145-
133+ types = lib_types .get_keyword_types ('keyword_robot_types_and_bool_hint' )
134+ assert types == {'arg1' : str }
146135
147- def test_init_args (lib ):
148- types = lib .get_keyword_types ('__init__' )
149- assert types == {'arg' : bool }
136+ @pytest .mark .skipif (PY2 , reason = 'Only applicable on Python 3' )
137+ def test_init_args (lib_types ):
138+ types = lib_types .get_keyword_types ('__init__' )
139+ assert types == {'arg' : str }
150140
151141
152142def test_dummy_magic_method (lib ):
@@ -180,7 +170,7 @@ def test_keyword_only_arguments(lib_types):
180170@pytest .mark .skipif (PY2 , reason = 'Only applicable on Python 3' )
181171def test_keyword_only_arguments_many (lib_types ):
182172 types = lib_types .get_keyword_types ('keyword_only_arguments_many' )
183- assert types == {'other' : type ( None ) }
173+ assert types == {}
184174
185175
186176@pytest .mark .skipif (PY2 , reason = 'Only applicable on Python 3' )
@@ -192,13 +182,13 @@ def test_keyword_mandatory_and_keyword_only_arguments(lib_types):
192182@pytest .mark .skipif (PY2 , reason = 'Only applicable on Python 3' )
193183def test_keyword_only_arguments_many_positional_and_default (lib_types ):
194184 types = lib_types .get_keyword_types ('keyword_only_arguments_many_positional_and_default' )
195- assert types == {'four' : bool , 'five' : type ( None ) , 'six' : bool }
185+ assert types == {'four' : Union [ int , str ] , 'six' : Union [ bool , str ] }
196186
197187
198188@pytest .mark .skipif (PY2 , reason = 'Only applicable on Python 3' )
199189def test_keyword_all_args (lib_types ):
200190 types = lib_types .get_keyword_types ('keyword_all_args' )
201- assert types == {'value' : bool }
191+ assert types == {}
202192
203193
204194@pytest .mark .skipif (PY2 , reason = 'Only applicable on Python 3' )
0 commit comments