Thursday, June 20, 2013

gstreamer.py and test_common_gstreamer.py test error (Part 2)

The error in the test that was telling me something is using "import gobject" is gone. It was due the __init__ in the flumotion/test/ folder, it was importing Gtk2Reactor which in turn is importing gobject. I commented everything in it and after some other tweaking in gstreamer.py and test_common_gstreamer.py the test (almost) passes:


flumotion.test.test_common_gstreamer
  Caps
    testCaps ...                                                         [FAIL]
    testCapsStreamheader ...                                             [FAIL]
DeepNotify testDeepNotify ... [OK] Factory testFakeSrc ... [OK] TestProperty testHasProperty ... [OK] testHasPropertyValue ... [OK]
=============================================================================== [FAIL] Traceback (most recent call last): File "/home/track/flumotion/flumotion/test/test_common_gstreamer.py", line 42, in testCaps 'video/x-raw, width=(int)10, ' File "/usr/lib/python2.7/dist-packages/twisted/trial/unittest.py", line 270, in assertEqual % (msg, pformat(first), pformat(second))) twisted.trial.unittest.FailTest: not equal: a = '<GstCaps at 0x2ed5a30>' b = 'video/x-raw, width=(int)10, framerate=(double)5; video/x-raw, width=(int)15, framerate=(double)10' flumotion.test.test_common_gstreamer.Caps.testCaps =============================================================================== [FAIL] Traceback (most recent call last): File "/home/track/flumotion/flumotion/test/test_common_gstreamer.py", line 49, in testCapsStreamheader 'streamheader=<...>') File "/usr/lib/python2.7/dist-packages/twisted/trial/unittest.py", line 270, in assertEqual % (msg, pformat(first), pformat(second))) twisted.trial.unittest.FailTest: not equal: a = '<GstCaps at 0x2ed5c50>' b = 'streamheader=<...>' flumotion.test.test_common_gstreamer.Caps.testCapsStreamheader ------------------------------------------------------------------------------- Ran 6 tests in 0.012s FAILED (failures=2, successes=4) link to commit [dbf3f98]

TO DO:
*Pass the whole test_common_gstreamer
*Continue the porting with feedcomponent.py and check.py


4 comments :

  1. Try replacing Gst.caps_from_string with Gst.Caps.from_string

    ReplyDelete
  2. Gtk2Reactor is provided by Twisted? Can you check with the twisted guys on how to upgrade that to use gi method?

    ReplyDelete
  3. They have this thing http://twistedmatrix.com/documents/13.0.0/api/twisted.internet.gtk3reactor.html

    ReplyDelete