Commit: 1ecde4370e42bb20a2fefb9e95cc84859ca73aeb
Author: calra123
Date: Tue Aug 11 22:16:23 2020 +0530
Branches: soc-2020-testing-frameworks
https://developer.blender.org/rB1ecde4370e42bb20a2fefb9e95cc84859ca73aeb
Added 3 new test cases for cloth, a check if no modiifer is added
===================================================================
M tests/python/modifiers.py
M tests/python/modules/mesh_test.py
M tests/python/physics_cloth.py
===================================================================
diff --git a/tests/python/modifiers.py b/tests/python/modifiers.py
index dfea16777e1..e1524432ab7 100644
--- a/tests/python/modifiers.py
+++ b/tests/python/modifiers.py
@@ -263,7 +263,7 @@ def main():
["BalloonLaplacianSmooth", "testBalloonLaplacianSmooth",
"expectedBalloonLaplacianSmooth",
[ModifierSpec('laplaciansmooth', 'LAPLACIANSMOOTH', {'lambda_factor':
12, 'lambda_border': 12})]],
- # Not reproducible anymore
+ # Gets updated often
["WavePlane", "testObjPlaneWave", "expObjPlaneWave",
[ModifierSpec('wave', 'WAVE', {})]],
diff --git a/tests/python/modules/mesh_test.py
b/tests/python/modules/mesh_test.py
index c32ed6cca19..e149193e8de 100644
--- a/tests/python/modules/mesh_test.py
+++ b/tests/python/modules/mesh_test.py
@@ -338,6 +338,10 @@ class MeshTest:
scene.frame_set(0)
modifier = test_object.modifiers.new(modifier_spec.modifier_name,
modifier_spec.modifier_type)
+
+ if modifier is None:
+ raise Exception("This modifier type is already added on the Test
Object, please remove it and try again.")
+
if self.verbose:
print("Created modifier '{}' of type '{}'.".
format(modifier_spec.modifier_name,
modifier_spec.modifier_type))
diff --git a/tests/python/physics_cloth.py b/tests/python/physics_cloth.py
index 4b5f3c25e5c..2eefe73ae7b 100644
--- a/tests/python/physics_cloth.py
+++ b/tests/python/physics_cloth.py
@@ -30,9 +30,19 @@ from modules.mesh_test import ModifierTest, ModifierSpec
def main():
test = [
+ # Make sure no modifier is added on the test object.
["ClothSimple", "testCloth", "expectedCloth",
[ModifierSpec('Cloth', 'CLOTH', {'settings': {'quality': 5}}, 35)]],
+ ["ClothPressure", "testObjClothPressure", "expObjClothPressure",
+ [ModifierSpec('Cloth2', 'CLOTH', {'settings': {'use_pressure': True,
'uniform_pressure_force': 1}}, 16)]],
+
+ ["ClothSelfCollision", "testClothCollision", "expClothCollision",
+ [ModifierSpec('Cloth', 'CLOTH', {'collision_settings':
{'use_self_collision': True}}, 67)]],
+
+ ["ClothSpring", "testTorusClothSpring", "expTorusClothSpring",
+ [ModifierSpec('Cloth2', 'CLOTH', {'settings':
{'use_internal_springs': True}}, 30)]],
+
]
cloth_test = ModifierTest(test, threshold=1e-3)
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs