From ad6aab49aedf3b381cb42af0a2ab2e70cb1a86e1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexandru=20B=C4=83lu=C8=9B?= Date: Thu, 6 Oct 2016 14:00:23 +0200 Subject: [PATCH] tests_: Check transition is gone when editing clip to another layer Differential Revision: https://phabricator.freedesktop.org/D1359 --- tests/check/python/test_clip.py | 2 ++ tests/check/python/test_timeline.py | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/tests/check/python/test_clip.py b/tests/check/python/test_clip.py index 6df4f26..fd57f76 100644 --- a/tests/check/python/test_clip.py +++ b/tests/check/python/test_clip.py @@ -73,6 +73,7 @@ class TestCopyPaste(unittest.TestCase): class TestTitleClip(unittest.TestCase): + def testGetPropertyNotInTrack(self): title_clip = GES.TitleClip.new() self.assertEqual(title_clip.props.text, "") @@ -106,6 +107,7 @@ class TestTitleClip(unittest.TestCase): class TestTrackElements(unittest.TestCase): + def test_add_to_layer_with_effect_remove_add(self): timeline = GES.Timeline.new_audio_video() self.assertEqual(len(timeline.get_tracks()), 2) diff --git a/tests/check/python/test_timeline.py b/tests/check/python/test_timeline.py index ba3f0f5..0c5f41e 100644 --- a/tests/check/python/test_timeline.py +++ b/tests/check/python/test_timeline.py @@ -60,3 +60,16 @@ class TestTimeline(unittest.TestCase): mainloop.run() self.assertTrue(loaded_called) handle.assert_not_called() + +class TestEditing(common.GESSimpleTimelineTest): + + def test_transition_disappears_when_moving_to_another_layer(self): + self.timeline.props.auto_transition = True + unused_clip1 = self.add_clip(0, 0, 100) + clip2 = self.add_clip(50, 0, 100) + self.assertEquals(len(self.layer.get_clips()), 4) + + layer2 = self.timeline.append_layer() + clip2.edit([], layer2.get_priority(), GES.EditMode.EDIT_NORMAL, GES.Edge.EDGE_NONE, clip2.props.start) + self.assertEquals(len(self.layer.get_clips()), 1) + self.assertEquals(len(layer2.get_clips()), 1) -- 2.7.4