[pitivi] test_factories_file.py: fix test cases
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] test_factories_file.py: fix test cases
- Date: Fri, 22 Jan 2010 18:05:16 +0000 (UTC)
commit b8046d0e0a115166ce17e45f739d3fc9c5cb004b
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date: Tue Jan 19 16:21:26 2010 -0800
test_factories_file.py: fix test cases
tests/test_factories_file.py | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/tests/test_factories_file.py b/tests/test_factories_file.py
index dcb0735..becdbfe 100644
--- a/tests/test_factories_file.py
+++ b/tests/test_factories_file.py
@@ -113,15 +113,20 @@ class TestPictureFileSourceFactory(TestCase):
self.factory.releaseBin(bin)
def testDefaultBinGhostPads(self):
- bin = gst.Bin()
- pad = gst.Pad('meh', gst.PAD_SRC)
- pad.set_caps(gst.Caps('audio/x-raw-float'))
- scale = gst.element_factory_make('identity')
- freeze = ImageFreeze()
- self.factory._dbinPadAddedCb(None, pad, scale, freeze, bin)
+ caps = gst.Caps('video/x-raw-rgb, width=2048')
+ video1 = VideoStream(caps, pad_name='src0')
+ self.factory.addOutputStream(video1)
+ bin = self.factory.makeBin()
+
+ pad = gst.Pad('src', gst.PAD_SRC)
+ pad.set_caps(caps)
+
+ self.failUnlessEqual(bin.get_pad('src'), None)
+ bin.decodebin.add_pad(pad)
self.failIfEqual(bin.get_pad('src'), None)
- self.factory._dbinPadRemovedCb(None, pad, scale, freeze, bin)
+ bin.decodebin.remove_pad(pad)
self.failUnlessEqual(bin.get_pad('src'), None)
+ self.factory._releaseBin(bin)
def testMakeStreamBin(self):
# streams are usually populated by the discoverer so here we have to do
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]