diff options
Diffstat (limited to 'source/tests')
-rw-r--r-- | source/tests/bl_run_operators.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/tests/bl_run_operators.py b/source/tests/bl_run_operators.py index b64055df252..476ccc30b54 100644 --- a/source/tests/bl_run_operators.py +++ b/source/tests/bl_run_operators.py @@ -137,7 +137,25 @@ def ctx_weightpaint(): bpy.ops.object.mode_set(mode='WEIGHT_PAINT') +def bpy_check_type_duplicates(): + # non essential sanity check + bl_types = dir(bpy.types) + bl_types_unique = set(bl_types) + + if len(bl_types) != len(bl_types_unique): + print("Error, found duplicates in 'bpy.types'") + for t in sorted(bl_types_unique): + tot = bl_types.count(t) + if tot > 1: + print(" '%s', %d" % (t, tot)) + import sys + sys.exit(1) + + def main(): + + bpy_check_type_duplicates() + # bpy.ops.wm.read_factory_settings() import bpy operators = [] |