fix other tests as well

Original commit message from CVS:
fix other tests as well
This commit is contained in:
Thomas Vander Stichele 2005-09-08 15:17:13 +00:00
parent 83f80e9942
commit 67cf07ff6a
3 changed files with 12 additions and 6 deletions

View file

@ -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:

View file

@ -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)

View file

@ -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()