Fix bl_pyapi_idprop unit test.
authorHoward Trickey <howard.trickey@gmail.com>
Sat, 16 Mar 2019 22:48:49 +0000 (18:48 -0400)
committerHoward Trickey <howard.trickey@gmail.com>
Sun, 17 Mar 2019 11:36:26 +0000 (07:36 -0400)
Scenes can now have a 'cycles' key when starting, so account for that.

tests/python/bl_pyapi_idprop.py

index 063d68f..3d0cbd2 100644 (file)
@@ -15,11 +15,12 @@ class TestHelper:
 
     def setUp(self):
         self._id = bpy.context.scene
-        assert(len(self._id.keys()) == 0)
+        assert(len(self._id.keys()) == 0 or self._id.keys() == ["cycles"])
 
     def tearDown(self):
         for key in list(self._id.keys()):
-            del self._id[key]
+            if key != "cycles":
+                del self._id[key]
 
     def assertAlmostEqualSeq(self, list1, list2):
         self.assertEqual(len(list1), len(list2))