[pitivi] Test removing an effect factory in the timeline
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Test removing an effect factory in the timeline
- Date: Wed, 22 Sep 2010 13:41:36 +0000 (UTC)
commit c8e9af30f2b607d90400ee90e3329b90da8ca877
Author: Thibault Saunier <tsaunier gnome org>
Date: Fri Jul 16 13:34:39 2010 -0400
Test removing an effect factory in the timeline
tests/test_timeline.py | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_timeline.py b/tests/test_timeline.py
index 5969bfd..4668a29 100644
--- a/tests/test_timeline.py
+++ b/tests/test_timeline.py
@@ -383,6 +383,33 @@ class TestTimelineAddRemoveEffectsTracks(TestCase):
track.removeTrackObject(track_effect2)
timeline.removeTimelineObject(timeline_object1)
+ def testRemoveEffectFactory(self):
+ effect_factory = FakeEffectFactory()
+ stream = AudioStream(gst.Caps("audio/x-raw-int"))
+ effect_factory.addInputStream(stream)
+ effect_factory.addOutputStream(stream)
+ track = Track(stream)
+ track_effect1 = TrackEffect(effect_factory, stream)
+ track.addTrackObject(track_effect1)
+ track_effect2 = TrackEffect(effect_factory, stream)
+ track.addTrackObject(track_effect2)
+ track_effect3 = TrackEffect(effect_factory, stream)
+ track.addTrackObject(track_effect3)
+ timeline_object1 = TimelineObject(effect_factory)
+ timeline_object1.addTrackObject(track_effect1)
+ timeline_object1.addTrackObject(track_effect2)
+ timeline_object1.addTrackObject(track_effect3)
+ timeline = Timeline()
+ timeline.addTrack(track)
+ timeline.addTimelineObject(timeline_object1)
+
+ self.failUnlessEqual(len(timeline_object1.track_objects), 3)
+ self.failUnlessEqual(len(timeline.timeline_objects), 1)
+ self.failUnlessEqual(len(track.track_objects), 3)
+ timeline.removeFactory(effect_factory)
+ self.failUnlessEqual(len(track.track_objects), 0)
+ self.failUnlessEqual(len(timeline.timeline_objects), 0)
+
class TestTimeline(TestCase):
def setUp(self):
self.source_factory = StubFactory()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]