File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,18 @@ def test_all_libnames_windows_dlls_consistency():
3030 assert tuple (sorted (ALL_LIBNAMES_WINDOWS )) == tuple (sorted (supported_libs .SUPPORTED_WINDOWS_DLLS .keys ()))
3131
3232
33+ @pytest .mark .parametrize ("dict_name" , ["SUPPORTED_LINUX_SONAMES" , "SUPPORTED_WINDOWS_DLLS" ])
34+ def test_libname_dict_values_are_unique (dict_name ):
35+ libname_dict = getattr (supported_libs , dict_name )
36+ libname_for_value = {}
37+ for libname , values in libname_dict .items ():
38+ for value in values :
39+ prev_libname = libname_for_value .get (value )
40+ if prev_libname is not None :
41+ raise RuntimeError (f"Multiple libnames for { value !r} : { prev_libname } , { libname } " )
42+ libname_for_value [value ] = libname
43+
44+
3345def test_all_libnames_libnames_requiring_os_add_dll_directory_consistency ():
3446 assert not (set (supported_libs .LIBNAMES_REQUIRING_OS_ADD_DLL_DIRECTORY ) - set (ALL_LIBNAMES_WINDOWS ))
3547
You can’t perform that action at this time.
0 commit comments