@@ -159,15 +159,15 @@ def test_check_type_of_param_value_sanity_check_paths(self):
159159 self .assertEqual (check_type_of_param_value ('sanity_check_paths' , inp ), (True , inp ))
160160
161161 inputs = [
162- {},
163- {'files' : []},
162+ {'files2' : []},
164163 {'files' : [], 'dirs' : [], 'somethingelse' : []},
165164 {'files' : [['bin/foo' ]], 'dirs' : []},
166165 {'files' : [], 'dirs' : [1 ]},
167166 {'files' : ['foo' ], 'dirs' : [(1 , 2 )]},
168167 ]
169168 for inp in inputs :
170- self .assertEqual (check_type_of_param_value ('sanity_check_paths' , inp ), (False , None ))
169+ self .assertEqual (check_type_of_param_value ('sanity_check_paths' , inp ), (False , None ),
170+ msg = f'Should be invalid: { inp } ' )
171171
172172 # sanity_check_paths (auto-convert)
173173 inp = {'files' : ['bin/foo' , ['bin/bar' , 'bin/baz' ]], 'dirs' : [['lib' , 'lib64' , 'lib32' ]]}
@@ -533,8 +533,8 @@ def test_is_value_of_type(self):
533533
534534 # list element for 'files', should be string or tuple
535535 self .assertFalse (is_value_of_type ({'files' : ['f1' , ['f2a' , 'f2b' ]], 'dirs' : []}, SANITY_CHECK_PATHS_DICT ))
536- # missing 'dirs' key
537- self .assertFalse (is_value_of_type ({'files' : ['f1' , 'f2' ]}, SANITY_CHECK_PATHS_DICT ))
536+ # missing (optional) 'dirs' key
537+ self .assertTrue (is_value_of_type ({'files' : ['f1' , 'f2' ]}, SANITY_CHECK_PATHS_DICT ))
538538 # tuple rather than list
539539 self .assertFalse (is_value_of_type ({'files' : (1 , 2 ), 'dirs' : []}, SANITY_CHECK_PATHS_DICT ))
540540 # int elements rather than strings/tuples-of-strings
@@ -544,7 +544,7 @@ def test_is_value_of_type(self):
544544 # extra key is not allowed
545545 self .assertFalse (is_value_of_type ({'files' : [], 'dirs' : [], 'foo' : []}, SANITY_CHECK_PATHS_DICT ))
546546 # no keys at all
547- self .assertFalse (is_value_of_type ({}, SANITY_CHECK_PATHS_DICT ))
547+ self .assertTrue (is_value_of_type ({}, SANITY_CHECK_PATHS_DICT ))
548548
549549 def test_as_hashable (self ):
550550 """Test as_hashable function."""
0 commit comments