[pitivi/1.0] tests: Avoid inconsistent timelines
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/1.0] tests: Avoid inconsistent timelines
- Date: Wed, 1 May 2019 01:50:27 +0000 (UTC)
commit 44e8dc63a015fc3ec60a3b15206e42c613371adb
Author: Thibault Saunier <tsaunier igalia com>
Date: Mon Apr 15 10:06:48 2019 -0400
tests: Avoid inconsistent timelines
Now GES makes it impossible to have 3 clips overlap at a same point
or two clips fully overlap, make sure that those cases do not happen
in our testsuite.
tests/test_undo_timeline.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/tests/test_undo_timeline.py b/tests/test_undo_timeline.py
index 4c6d6757..e324bd70 100644
--- a/tests/test_undo_timeline.py
+++ b/tests/test_undo_timeline.py
@@ -142,11 +142,14 @@ class TestTimelineObserver(BaseTestUndoTimeline):
uri = common.get_sample_uri("tears_of_steel.webm")
asset = GES.UriClipAsset.request_sync(uri)
clip2 = asset.extract()
+ clip2.props.start = 1 * Gst.SECOND
- self.layer.add_clip(clip1)
- self.layer.add_clip(clip2)
+ self.assertTrue(self.layer.add_clip(clip1))
+ self.assertTrue(self.layer.add_clip(clip2))
# The selection does not care about GES.Groups, only about GES.Clips.
self.timeline_container.timeline.selection.select([clip1, clip2])
+ self.assertEqual(clip1.props.timeline, self.layer.get_timeline())
+ self.assertEqual(clip2.props.timeline, self.layer.get_timeline())
self.timeline_container.group_action.activate(None)
self.assertTrue(isinstance(clip1.get_parent(), GES.Group))
@@ -527,7 +530,7 @@ class TestLayerObserver(BaseTestUndoTimeline):
clip2 = asset.extract()
clip2.set_start(clip1.props.duration / 2)
- clip2.set_duration(10 * Gst.SECOND)
+ clip2.set_duration(clip2.props.max_duration)
with self.action_log.started("add second clip"):
self.layer.add_clip(clip2)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]