gstreamer/bindings/python/testsuite/test_timeline.py

23 lines
602 B
Python
Raw Normal View History

import glib
import gst
from common import TestCase
import ges
class Timeline(TestCase):
def testTimeline(self):
tl = ges.timeline_new_audio_video()
lyr = ges.SimpleTimelineLayer()
2011-06-10 14:58:55 +00:00
tck = ges.track_audio_raw_new()
2011-06-10 14:58:55 +00:00
assert (tl.add_track(tck) == True)
#We should have two tracks from the timeline_new_audio_video() function + 1
self.failIf(len(tl.get_tracks()) != 3)
assert (tl.remove_track(tck) == True)
assert (tl.add_layer(lyr) == True)
2011-06-10 14:58:55 +00:00
self.failIf(len(tl.get_layers()) != 1)
assert (tl.remove_layer(lyr) == True)