4 # FIXME: How to avoid creating / killing vlc for each test method ?
6 class VariablesTestCase( unittest.TestCase ):
7 """[PyMC] Test misc variables interaction"""
9 self.mc = vlc.MediaControl( [ '--quiet'] )
10 # FIXME ! - Get this through children test
11 self.libvlc = vlc.Object(1)
12 self.playlist = vlc.Object(268)
15 self.playlist.release()
19 # The Python binding can't create variables, so just get default ones
21 """[PyMC] Get/Set integer variable"""
22 assert self.libvlc.get( "width" ) == 0
23 self.libvlc.set( "width", 42 )
24 assert self.libvlc.get( 'width' ) == 42
26 # FIXME: Python binding should listen to return value and raise exception
27 def testInvalidInt( self ):
28 """[PyMC] Get/Set invalid integer"""
29 self.libvlc.set( "width" , 5 )
30 self.libvlc.set( "width", "foo" )
31 assert self.libvlc.get( "width" ) == -1
33 def testString( self ):
34 """[PyMC] Get/Set string variable"""
35 assert self.libvlc.get( "open" ) == ''
36 self.libvlc.set( "open", "foo" )
37 assert self.libvlc.get( "open" ) == "foo"