mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
fix other tests as well
Original commit message from CVS: fix other tests as well
This commit is contained in:
parent
83f80e9942
commit
67cf07ff6a
3 changed files with 12 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-09-08 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* testsuite/test_element.py:
|
||||
* testsuite/test_pipeline.py:
|
||||
fix other tests as well
|
||||
|
||||
2005-09-08 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/gstelement.override:
|
||||
|
|
|
@ -99,13 +99,13 @@ class FakeSinkTest(ElementTest):
|
|||
assert new_s == new
|
||||
|
||||
assert self.element.set_state(old)
|
||||
assert self.element.get_state() == old
|
||||
assert self.element.get_state(0.0)[1] == old
|
||||
|
||||
# FIXME: replace with messages
|
||||
# self.element.connect('state-change', state_change_cb)
|
||||
|
||||
assert self.element.set_state(new)
|
||||
assert self.element.get_state() == new
|
||||
assert self.element.get_state(0.0)[1] == new
|
||||
|
||||
def testStateChangeNullReady(self):
|
||||
self.checkStateChange(gst.STATE_NULL, gst.STATE_READY)
|
||||
|
|
|
@ -42,15 +42,15 @@ class Pipeline(unittest.TestCase):
|
|||
gst.element_link_many(source, sink)
|
||||
|
||||
def testRun(self):
|
||||
self.assertEqual(self.pipeline.get_state(), gst.STATE_NULL)
|
||||
self.assertEqual(self.pipeline.get_state(None)[1], gst.STATE_NULL)
|
||||
self.pipeline.set_state(gst.STATE_PLAYING)
|
||||
self.assertEqual(self.pipeline.get_state(), gst.STATE_PLAYING)
|
||||
self.assertEqual(self.pipeline.get_state(None)[1], gst.STATE_PLAYING)
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
self.assertEqual(self.pipeline.get_state(), gst.STATE_PLAYING)
|
||||
self.assertEqual(self.pipeline.get_state(None)[1], gst.STATE_PLAYING)
|
||||
self.pipeline.set_state(gst.STATE_NULL)
|
||||
self.assertEqual(self.pipeline.get_state(), gst.STATE_NULL)
|
||||
self.assertEqual(self.pipeline.get_state(None)[1], gst.STATE_NULL)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in a new issue