[Bf-blender-cvs] [638c2f0c3f7] refactor-idprop-ui-data: Add "id_properties_clear()" calls to UI data tests
Hans Goudey
noreply at git.blender.org
Wed Jul 14 17:21:58 CEST 2021
Commit: 638c2f0c3f79c874369aa7b099c691a48b276117
Author: Hans Goudey
Date: Wed Jul 14 11:21:46 2021 -0400
Branches: refactor-idprop-ui-data
https://developer.blender.org/rB638c2f0c3f79c874369aa7b099c691a48b276117
Add "id_properties_clear()" calls to UI data tests
===================================================================
M tests/python/bl_pyapi_idprop.py
===================================================================
diff --git a/tests/python/bl_pyapi_idprop.py b/tests/python/bl_pyapi_idprop.py
index 18bd5fe968e..ec5da137004 100644
--- a/tests/python/bl_pyapi_idprop.py
+++ b/tests/python/bl_pyapi_idprop.py
@@ -255,7 +255,9 @@ class TestRNAData(TestHelper, unittest.TestCase):
self.assertEqual(len(props), 0)
# Access default RNA data values
+ test_object.id_properties_clear()
test_object["test_prop"] = 0.5
+ props = test_object.id_properties_ensure()
rna_data = props.ui_data("test_prop")
self.assertTrue("min" in rna_data)
self.assertLess(rna_data["min"], -10000.0)
@@ -291,6 +293,7 @@ class TestRNAData(TestHelper, unittest.TestCase):
self.assertGreater(rna_data["soft_max"], 10000.0)
# Test RNA data for string property
+ test_object.id_properties_clear()
test_object["test_string_prop"] = "Hello there!"
props = test_object.id_properties_ensure()
props.ui_data_update("test_string_prop", default="Goodbye where?")
@@ -298,6 +301,7 @@ class TestRNAData(TestHelper, unittest.TestCase):
self.assertEqual(rna_data["default"], "Goodbye where?")
# Test RNA data for array property
+ test_object.id_properties_clear()
test_object["test_array_prop"] = [1, 2, 3]
props = test_object.id_properties_ensure()
props.ui_data_update("test_array_prop", default=[1, 2])
More information about the Bf-blender-cvs
mailing list