Anim: avoid running LayeredInsertKeyTest in non-experimental build

Avoid running a Python unit test for layered Actions in non-experimental
builds.

Due to a misunderstanding, enabling the user preference for the 'Slotted
Actions' experimental feature is still possible on release builds, which
caused this test to fail on non-experimental builds (because it's
intentionally missing a chunk of experimental code).

No functional changes to Blender itself.

Pull Request: https://projects.blender.org/blender/blender/pulls/128483
This commit is contained in:
Sybren A. Stüvel
2024-10-02 15:23:11 +02:00
parent 8c37b20dd5
commit a380567679

View File

@@ -256,16 +256,18 @@ class InsertKeyTest(AbstractKeyframingTest, unittest.TestCase):
self.assertEqual(["Téšt"], [group.name for group in fgroups])
class LayeredInsertKeyTest(InsertKeyTest):
@classmethod
def setUpClass(cls) -> None:
enable_experimental_animation_baklava()
super().setUpClass()
if hasattr(bpy.types, 'ActionSlot'):
# This test only makes sense when built with slotted/layered Actions.
class LayeredInsertKeyTest(InsertKeyTest):
@classmethod
def setUpClass(cls) -> None:
enable_experimental_animation_baklava()
super().setUpClass()
@classmethod
def tearDownClass(cls) -> None:
disable_experimental_animation_baklava()
super().tearDownClass()
@classmethod
def tearDownClass(cls) -> None:
disable_experimental_animation_baklava()
super().tearDownClass()
class VisualKeyingTest(AbstractKeyframingTest, unittest.TestCase):