Changeset View
Changeset View
Standalone View
Standalone View
tests/python/bl_pyapi_idprop_datablock.py
| Context not available. | |||||
| print_fail_msg_and_exit("test failed") | print_fail_msg_and_exit("test failed") | ||||
| def expect_ouput_or_abort(*, fn, match_stderr=None, match_stdout=None): | def expect_output_or_abort(*, fn, match_stderr=None, match_stdout=None): | ||||
| stdout, stderr = io.StringIO(), io.StringIO() | stdout, stderr = io.StringIO(), io.StringIO() | ||||
| Context not available. | |||||
| expect_false_or_abort(not hasattr(op, "id_prop")) | expect_false_or_abort(not hasattr(op, "id_prop")) | ||||
| bpy.utils.register_class(TEST_PT_DatablockProp) | bpy.utils.register_class(TEST_PT_DatablockProp) | ||||
| expect_ouput_or_abort( | expect_output_or_abort( | ||||
| fn=lambda: bpy.utils.register_class(TEST_Op), | fn=lambda: bpy.utils.register_class(TEST_Op), | ||||
| match_stderr="^ValueError: bpy_struct \"SCENE_OT_test_op\" registration error:", | match_stderr="^ValueError: bpy_struct \"SCENE_OT_test_op\" registration error:", | ||||
| ) | ) | ||||
| Context not available. | |||||