[pitivi: 18/28] tests/test_timeline.py, test_etree_formatter.py: update test cases



commit 011f3f3ff23f542aa011d9fa7e95c198c8efff00
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date:   Fri Dec 4 00:35:51 2009 -0800

    tests/test_timeline.py,test_etree_formatter.py: update test cases

 tests/test_etree_formatter.py |    2 +-
 tests/test_timeline.py        |   32 ++++++++++++++++----------------
 2 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/tests/test_etree_formatter.py b/tests/test_etree_formatter.py
index 23e1114..6ae90ff 100644
--- a/tests/test_etree_formatter.py
+++ b/tests/test_etree_formatter.py
@@ -551,7 +551,7 @@ class TestFormatterLoad(TestCase):
         # point gun at foot; pull trigger
         track = self.formatter._loadTrack(element)
 
-        self.failUnlessEqual(len(track.track_objects), 2)
+        self.failUnlessEqual(len(track.track_objects), 1)
         # FIXME: this is an hack
         self.failUnlessEqual(str(track.stream), str(stream))
 
diff --git a/tests/test_timeline.py b/tests/test_timeline.py
index fad4d4b..c3c4da1 100644
--- a/tests/test_timeline.py
+++ b/tests/test_timeline.py
@@ -876,27 +876,27 @@ class TestTimelineAddFactory(TestCase):
     def testAudioOnly(self):
         self.factory.addOutputStream(self.audio_stream1)
         self.timeline.addSourceFactory(self.factory)
-        self.failUnlessEqual(len(self.audio_track1.track_objects), 2)
-        self.failUnlessEqual(len(self.audio_track2.track_objects), 1)
-        self.failUnlessEqual(len(self.video_track1.track_objects), 1)
-        self.failUnlessEqual(len(self.video_track2.track_objects), 1)
+        self.failUnlessEqual(len(self.audio_track1.track_objects), 1)
+        self.failUnlessEqual(len(self.audio_track2.track_objects), 0)
+        self.failUnlessEqual(len(self.video_track1.track_objects), 0)
+        self.failUnlessEqual(len(self.video_track2.track_objects), 0)
 
     def testVideoOnly(self):
         self.factory.addOutputStream(self.video_stream1)
         self.timeline.addSourceFactory(self.factory)
-        self.failUnlessEqual(len(self.audio_track1.track_objects), 1)
-        self.failUnlessEqual(len(self.audio_track2.track_objects), 1)
-        self.failUnlessEqual(len(self.video_track1.track_objects), 2)
-        self.failUnlessEqual(len(self.video_track2.track_objects), 1)
+        self.failUnlessEqual(len(self.audio_track1.track_objects), 0)
+        self.failUnlessEqual(len(self.audio_track2.track_objects), 0)
+        self.failUnlessEqual(len(self.video_track1.track_objects), 1)
+        self.failUnlessEqual(len(self.video_track2.track_objects), 0)
 
     def test1Audio1Video(self):
         self.factory.addOutputStream(self.audio_stream1)
         self.factory.addOutputStream(self.video_stream1)
         self.timeline.addSourceFactory(self.factory)
-        self.failUnlessEqual(len(self.audio_track1.track_objects), 2)
-        self.failUnlessEqual(len(self.audio_track2.track_objects), 1)
-        self.failUnlessEqual(len(self.video_track1.track_objects), 2)
-        self.failUnlessEqual(len(self.video_track2.track_objects), 1)
+        self.failUnlessEqual(len(self.audio_track1.track_objects), 1)
+        self.failUnlessEqual(len(self.audio_track2.track_objects), 0)
+        self.failUnlessEqual(len(self.video_track1.track_objects), 1)
+        self.failUnlessEqual(len(self.video_track2.track_objects), 0)
 
     def testConflictNotEnoughTracks(self):
         # 3 audio streams, only 2 audio tracks in the timeline
@@ -905,10 +905,10 @@ class TestTimelineAddFactory(TestCase):
         self.factory.addOutputStream(self.audio_stream3)
         self.failUnlessRaises(TimelineError, self.timeline.addSourceFactory,
                 self.factory, strict=True)
-        self.failUnlessEqual(len(self.audio_track1.track_objects), 1)
-        self.failUnlessEqual(len(self.audio_track2.track_objects), 1)
-        self.failUnlessEqual(len(self.video_track1.track_objects), 1)
-        self.failUnlessEqual(len(self.video_track2.track_objects), 1)
+        self.failUnlessEqual(len(self.audio_track1.track_objects), 0)
+        self.failUnlessEqual(len(self.audio_track2.track_objects), 0)
+        self.failUnlessEqual(len(self.video_track1.track_objects), 0)
+        self.failUnlessEqual(len(self.video_track2.track_objects), 0)
 
 class TestContexts(TestCase):
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]