[pitivi] Add add/remove TrackEffect testing
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Add add/remove TrackEffect testing
- Date: Wed, 22 Sep 2010 13:41:31 +0000 (UTC)
commit f28e735f0db849fc395b03c30214bcf026d45c3b
Author: Thibault Saunier <tsaunier gnome org>
Date: Fri Jul 16 13:00:02 2010 -0400
Add add/remove TrackEffect testing
tests/test_timeline.py | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_timeline.py b/tests/test_timeline.py
index 3c569e9..5969bfd 100644
--- a/tests/test_timeline.py
+++ b/tests/test_timeline.py
@@ -342,6 +342,47 @@ class TestTimelineAddRemoveTimelineObjects(TestCase):
timeline.removeFactory(source_factory)
self.failUnlessEqual(len(timeline.timeline_objects), 0)
+class TestTimelineAddRemoveEffectsTracks(TestCase):
+ def testAddRemoveEffectTracks(self):
+ stream = VideoStream(gst.Caps("video/x-raw-rgb"))
+ source_factory = StubFactory()
+ source_factory.addOutputStream(stream)
+ effect_factory = FakeEffectFactory()
+ effect_factory.addInputStream(stream)
+ effect_factory.addOutputStream(stream)
+ timeline = Timeline()
+ track = Track(stream)
+
+ track_effect1 = TrackEffect(effect_factory, stream)
+ track_effect2 = TrackEffect(effect_factory, stream)
+
+ track_object1 = SourceTrackObject(source_factory, stream)
+ track.addTrackObject(track_object1)
+ timeline_object1 = TimelineObject(source_factory)
+ timeline_object1.addTrackObject(track_object1)
+ timeline.addTimelineObject(timeline_object1)
+
+ track.addTrackObject(track_effect1)
+ timeline_object1.addTrackObject(track_effect1)
+ self.failUnlessRaises(TimelineError,
+ timeline_object1.addTrackObject, track_effect1)
+ track.addTrackObject(track_effect2)
+ timeline_object1.addTrackObject(track_effect2)
+ self.failUnlessRaises(TimelineError,
+ timeline_object1.addTrackObject, track_effect2)
+
+ timeline_object1.removeTrackObject(track_effect1)
+ self.failUnlessRaises(TimelineError,
+ timeline_object1.removeTrackObject, track_effect1)
+ timeline_object1.removeTrackObject(track_effect2)
+ self.failUnlessRaises(TimelineError,
+ timeline_object1.removeTrackObject, track_effect2)
+
+
+ track.removeTrackObject(track_effect1)
+ track.removeTrackObject(track_effect2)
+ timeline.removeTimelineObject(timeline_object1)
+
class TestTimeline(TestCase):
def setUp(self):
self.source_factory = StubFactory()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]