X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=test%2FPyMediaControlVariablesTest.py;h=9a994f025fd60ef31ab75e6171f828e86230b081;hb=e6a39a3308e03cf5699f35fe7a13d04ccb636689;hp=84d7747c965c06a5c7dfd9689ff06283806ee812;hpb=0638177349c21821748e4d329f509f7bf266f41d;p=vlc diff --git a/test/PyMediaControlVariablesTest.py b/test/PyMediaControlVariablesTest.py index 84d7747c96..9a994f025f 100644 --- a/test/PyMediaControlVariablesTest.py +++ b/test/PyMediaControlVariablesTest.py @@ -1,38 +1,43 @@ -import vlc -import unittest - -# FIXME: How to avoid creating / killing vlc for each test method ? - -class VariablesTestCase( unittest.TestCase ): - """Test misc variables interaction""" - def setUp( self ): - self.mc = vlc.MediaControl( [ '--quiet'] ) - # FIXME ! - Get this through children test - self.libvlc = vlc.Object(1) - self.playlist = vlc.Object(268) - - def tearDown( self ): - self.playlist.release() - self.libvlc.release() - self.mc.exit() - - # The Python binding can't create variables, so just get default ones - def testInt( self ): - """Get/Set integer variable""" - assert self.libvlc.get( "width" ) == 0 - self.libvlc.set( "width", 42 ) - assert self.libvlc.get( 'width' ) == 42 - - # FIXME: Python binding should listen to return value and raise exception - def testInvalidInt( self ): - """Get/Set invalid integer""" - self.libvlc.set( "width" , 5 ) - self.libvlc.set( "width", "foo" ) - assert self.libvlc.get( "width" ) == -1 - - def testString( self ): - """Get/Set string variable""" - assert self.libvlc.get( "open" ) == '' - self.libvlc.set( "open", "foo" ) - assert self.libvlc.get( "open" ) == "foo" - +#import vlc +#import unittest +# +## FIXME: Always segfault +# +#class VariablesTestCase( unittest.TestCase ): +# """[PyMC] Test misc variables interaction""" +# def setUp( self ): +# print "broken" +## self.mc = vlc.MediaControl( [ '--quiet'] ) +# # FIXME ! - Get this through children test +## self.libvlc = vlc.Object(1) +## self.playlist = vlc.Object(268) +# +# def tearDown( self ): +# print "broken" +## self.playlist.release() +## self.libvlc.release() +## self.mc.exit() +# +# # The Python binding can't create variables, so just get default ones +# def testInt( self ): +# """[PyMC] Get/Set integer variable""" +# print "broken" +## assert self.libvlc.get( "width" ) == 0 +## self.libvlc.set( "width", 42 ) +## assert self.libvlc.get( 'width' ) == 42 +# +# # FIXME: Python binding should listen to return value and raise exception +# def testInvalidInt( self ): +# """[PyMC] Get/Set invalid integer""" +# print "broken" +## self.libvlc.set( "width" , 5 ) +## self.libvlc.set( "width", "foo" ) +## assert self.libvlc.get( "width" ) == -1 +# +# def testString( self ): +# """[PyMC] Get/Set string variable""" +# print "broken" +## assert self.libvlc.get( "open" ) == '' +## self.libvlc.set( "open", "foo" ) +## assert self.libvlc.get( "open" ) == "foo" +#