mirror of
https://github.com/Relintai/regression-test-project.git
synced 2025-03-12 18:38:50 +01:00
Workaround for remove/remove_at (#58)
This commit is contained in:
parent
80187caa54
commit
16ef304c5f
@ -257,16 +257,19 @@ func check_if_is_allowed(method_data : Dictionary) -> bool:
|
||||
|
||||
return true
|
||||
|
||||
func remove_disabled_methods(method_list : Array, exceptions : Array) -> void:
|
||||
for exception in exceptions:
|
||||
func remove_disabled_methods(method_list : Array, exceptions : Array) -> Array:
|
||||
var new_list : Array = [] # Workaround for GH 50139 renaming remove to remove_at
|
||||
for method_index in range(method_list.size()):
|
||||
var index: int = -1
|
||||
for method_index in range(method_list.size()):
|
||||
for exception in exceptions:
|
||||
if method_list[method_index].get("name") == exception:
|
||||
index = method_index
|
||||
break
|
||||
if index != -1:
|
||||
method_list.remove(index)
|
||||
if index == -1:
|
||||
new_list.append(method_list[method_index])
|
||||
|
||||
method_list = new_list
|
||||
return new_list
|
||||
|
||||
|
||||
# Return all available classes which can be used
|
||||
|
@ -48,7 +48,7 @@ func tests_all_functions() -> void:
|
||||
var method_list: Array = ClassDB.class_get_method_list(name_of_class, !use_parent_methods)
|
||||
|
||||
# Removes excluded methods
|
||||
BasicData.remove_disabled_methods(method_list, BasicData.function_exceptions)
|
||||
method_list = BasicData.remove_disabled_methods(method_list, BasicData.function_exceptions)
|
||||
|
||||
for _i in range(1):
|
||||
for method_data in method_list:
|
||||
|
Loading…
Reference in New Issue
Block a user