[Bf-blender-cvs] [dc2ae8fdf2a] blender2.8: Unittest: Update background set test to test for proper flag

Dalai Felinto noreply at git.blender.org
Fri Nov 24 14:44:25 CET 2017


Commit: dc2ae8fdf2a28821b337acbc1a592506ad2674c6
Author: Dalai Felinto
Date:   Fri Nov 24 11:40:52 2017 -0200
Branches: blender2.8
https://developer.blender.org/rBdc2ae8fdf2a28821b337acbc1a592506ad2674c6

Unittest: Update background set test to test for proper flag

This test will fail until depsgraph is fixed.
But introduced on 87c821ff26be.

===================================================================

M	tests/python/view_layer/test_background_set.py

===================================================================

diff --git a/tests/python/view_layer/test_background_set.py b/tests/python/view_layer/test_background_set.py
index a227d4d189c..5f1d31e823f 100644
--- a/tests/python/view_layer/test_background_set.py
+++ b/tests/python/view_layer/test_background_set.py
@@ -42,13 +42,11 @@ class UnitTesting(ViewLayerTesting):
         # Test if objects were properly added to depsgraph.
         self.assertEqual(3, len(bpy.context.depsgraph.objects))
 
-        # At this point the ideal would be to be able to check if
-        # the objects are not selected and their relationship line
-        # and origin is not visible.
-        #
-        # However we can't check this from the current API
-        # so we either do image comparison, expand the API
-        # (won't work relationship lines) or leave as it is.
+        # We now check if the objects are properly flagged as from set
+        # These objects can't be possible nor show their origins or
+        # relationship lines
+        for ob in bpy.context.depsgraph.objects:
+            self.assertTrue(ob.is_from_set)
 
         # Test if removing is working fine.
         main_scene.background_set = None



More information about the Bf-blender-cvs mailing list