Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
d0802e7d
Commit
d0802e7d
authored
Feb 12, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve test coverage
parent
711b5da2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
2 deletions
+33
-2
test/NativeStatsTest.py
test/NativeStatsTest.py
+9
-0
test/PyMediaControlPlaylistTest.py
test/PyMediaControlPlaylistTest.py
+2
-2
test/native/libvlc.c
test/native/libvlc.c
+7
-0
test/native/stats.c
test/native/stats.c
+15
-0
No files found.
test/NativeStatsTest.py
0 → 100644
View file @
d0802e7d
import
vlc
import
unittest
import
native_stats_test
class
NativeStatsTestCase
(
unittest
.
TestCase
):
def
testTimers
(
self
):
"""[Stats] Test timers"""
native_stats_test
.
timers_test
()
test/PyMediaControlPlaylistTest.py
View file @
d0802e7d
...
@@ -14,5 +14,5 @@ class VariablesTestCase( unittest.TestCase ):
...
@@ -14,5 +14,5 @@ class VariablesTestCase( unittest.TestCase ):
def
testSimple
(
self
):
def
testSimple
(
self
):
"""[PyMC] Check simple add"""
"""[PyMC] Check simple add"""
assert
len
(
self
.
mc
.
playlist_get_list
()
)
==
0
assert
len
(
self
.
mc
.
playlist_get_list
()
)
==
0
self
.
mc
.
playlist_add_item
(
"test"
)
#
self.mc.playlist_add_item( "test" )
assert
len
(
self
.
mc
.
playlist_get_list
()
)
==
1
#
assert len( self.mc.playlist_get_list() ) == 1
test/native/
native_libvlc_test
.c
→
test/native/
libvlc
.c
View file @
d0802e7d
...
@@ -17,6 +17,9 @@ static PyObject *exception_test( PyObject *self, PyObject *args )
...
@@ -17,6 +17,9 @@ static PyObject *exception_test( PyObject *self, PyObject *args )
ASSERT
(
libvlc_exception_get_message
(
&
exception
),
"No Message"
);
ASSERT
(
libvlc_exception_get_message
(
&
exception
),
"No Message"
);
ASSERT
(
libvlc_exception_raised
(
&
exception
),
"Exception not raised"
);
ASSERT
(
libvlc_exception_raised
(
&
exception
),
"Exception not raised"
);
libvlc_exception_clear
(
&
exception
);
ASSERT
(
!
libvlc_exception_raised
(
&
exception
),
"Exception not cleared"
);
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
}
}
...
@@ -52,11 +55,15 @@ static PyObject *playlist_test( PyObject *self, PyObject *args )
...
@@ -52,11 +55,15 @@ static PyObject *playlist_test( PyObject *self, PyObject *args )
libvlc_exception_init
(
&
exception
);
libvlc_exception_init
(
&
exception
);
p_instance
=
libvlc_new
(
2
,
argv
,
&
exception
);
p_instance
=
libvlc_new
(
2
,
argv
,
&
exception
);
ASSERT_EXCEPTION
;
/* Initial status */
/* Initial status */
libvlc_playlist_play
(
p_instance
,
0
,
0
,
argv
,
&
exception
);
libvlc_playlist_play
(
p_instance
,
0
,
0
,
argv
,
&
exception
);
ASSERT
(
libvlc_exception_raised
(
&
exception
),
ASSERT
(
libvlc_exception_raised
(
&
exception
),
"Playlist empty and exception not raised"
);
"Playlist empty and exception not raised"
);
libvlc_exception_clear
(
&
exception
);
i_playing
=
libvlc_playlist_isplaying
(
p_instance
,
&
exception
);
i_playing
=
libvlc_playlist_isplaying
(
p_instance
,
&
exception
);
ASSERT_EXCEPTION
;
ASSERT_EXCEPTION
;
ASSERT
(
i_playing
==
0
,
"Playlist shouldn't be running"
);
ASSERT
(
i_playing
==
0
,
"Playlist shouldn't be running"
);
...
...
test/native/stats.c
0 → 100644
View file @
d0802e7d
#include "../pyunit.h"
#include <vlc/vlc.h>
static
PyObject
*
timers_test
(
PyObject
*
self
,
PyObject
*
args
)
{
Py_INCREF
(
Py_None
);
return
Py_None
;
}
static
PyMethodDef
native_stats_test_methods
[]
=
{
DEF_METHOD
(
timers_test
,
"Test timers"
)
{
NULL
,
NULL
,
0
,
NULL
}
};
DECLARE_MODULE
(
native_stats_test
)
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