Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
8398230c
Commit
8398230c
authored
Mar 20, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test
parent
14509b07
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
71 deletions
+69
-71
test/NativeLibvlcTest.py
test/NativeLibvlcTest.py
+0
-1
test/NativeStatsTest.py
test/NativeStatsTest.py
+0
-1
test/PyMediaControlBaseTest.py
test/PyMediaControlBaseTest.py
+8
-8
test/PyMediaControlPlaylistTest.py
test/PyMediaControlPlaylistTest.py
+15
-15
test/PyMediaControlVariablesTest.py
test/PyMediaControlVariablesTest.py
+43
-43
test/setup.py
test/setup.py
+3
-3
No files found.
test/NativeLibvlcTest.py
View file @
8398230c
import
vlc
import
unittest
import
native_libvlc_test
...
...
test/NativeStatsTest.py
View file @
8398230c
import
vlc
import
unittest
import
native_stats_test
...
...
test/PyMediaControlBaseTest.py
View file @
8398230c
import
vlc
import
unittest
class
BaseTestCase
(
unittest
.
TestCase
):
def
testStartup
(
self
):
"""[PyMC] Check that VLC starts"""
mc
=
vlc
.
MediaControl
(
[
'--quiet'
])
mc
.
exit
()
#
import vlc
#
import unittest
#
#
class BaseTestCase( unittest.TestCase ):
#
def testStartup(self):
#
"""[PyMC] Check that VLC starts"""
#
mc = vlc.MediaControl( ['--quiet'])
#
mc.exit()
test/PyMediaControlPlaylistTest.py
View file @
8398230c
import
vlc
import
unittest
#
import vlc
#
import unittest
# FIXME: How to avoid creating / killing vlc for each test method ?
class
VariablesTestCase
(
unittest
.
TestCase
):
"""[PyMC] Test misc variables interaction"""
def
setUp
(
self
):
self
.
mc
=
vlc
.
MediaControl
(
[
'--quiet'
]
)
def
tearDown
(
self
):
self
.
mc
.
exit
()
def
testSimple
(
self
):
"""[PyMC] Check simple add"""
assert
len
(
self
.
mc
.
playlist_get_list
()
)
==
0
# self.mc.playlist_add_item( "test" )
# assert len( self.mc.playlist_get_list() ) == 1
#
class VariablesTestCase( unittest.TestCase ):
#
"""[PyMC] Test misc variables interaction"""
#
def setUp( self ):
#
self.mc = vlc.MediaControl( [ '--quiet'] )
#
#"
def tearDown( self ):
#
self.mc.exit()
#
#
def testSimple( self ):
#
"""[PyMC] Check simple add"""
#
assert len( self.mc.playlist_get_list() ) == 0
#
#
self.mc.playlist_add_item( "test" )
#
#
assert len( self.mc.playlist_get_list() ) == 1
test/PyMediaControlVariablesTest.py
View file @
8398230c
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"
#
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"
#
test/setup.py
View file @
8398230c
...
...
@@ -32,7 +32,7 @@ def get_ldflags():
ldflags
=
[]
if
os
.
sys
.
platform
==
'darwin'
:
ldflags
=
"-read_only_relocs warning"
.
split
()
ldflags
.
extend
(
os
.
popen
(
'%s --libs vlc
pic
builtin'
%
vlcconfig
,
'r'
).
readline
().
rstrip
().
split
())
ldflags
.
extend
(
os
.
popen
(
'%s --libs vlc builtin'
%
vlcconfig
,
'r'
).
readline
().
rstrip
().
split
())
if
os
.
sys
.
platform
==
'darwin'
:
ldflags
.
append
(
'-lstdc++'
)
return
ldflags
...
...
@@ -41,7 +41,7 @@ def get_ldflags():
native_libvlc_test
=
Extension
(
'native_libvlc_test'
,
sources
=
[
'native/libvlc.c'
],
include_dirs
=
[
'../include'
,
'../'
,
'/usr/win32/include'
],
extra_objects
=
[
'../
lib/libvlc_pi
c.a'
],
extra_objects
=
[
'../
src/libvl
c.a'
],
extra_compile_args
=
get_cflags
(),
extra_link_args
=
[
'-L../..'
]
+
get_ldflags
(),
)
...
...
@@ -49,7 +49,7 @@ native_libvlc_test = Extension( 'native_libvlc_test',
native_stats_test
=
Extension
(
'native_stats_test'
,
sources
=
[
'native/stats.c'
],
include_dirs
=
[
'../include'
,
'../'
,
'/usr/win32/include'
],
extra_objects
=
[
'../
lib/libvlc_pi
c.a'
],
extra_objects
=
[
'../
src/libvl
c.a'
],
extra_compile_args
=
get_cflags
(),
extra_link_args
=
[
'-L../..'
]
+
get_ldflags
(),
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment