forked from avTranscoder/avTranscoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestLibrary.py
More file actions
33 lines (25 loc) · 1.12 KB
/
Copy pathtestLibrary.py
File metadata and controls
33 lines (25 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from nose.tools import *
from pyAvTranscoder import avtranscoder as av
def testListLibraries():
"""
Check name and license of libraries.
"""
librariesName = set(["avtranscoder", "avutil", "avformat", "avcodec", "avresample", "swresample", "swscale", "avfilter"])
for library in av.getLibraries():
libraryName = library.getName()
if libraryName == "avtranscoder":
assert_equals(library.getLicense(), "GPL v2 or LGPL v2.1")
assert_in(libraryName, librariesName)
librariesName.remove(libraryName)
# avresample or swresample, if avtranscoder depends on libav or ffmpeg
assert_equals(len(librariesName), 1)
def testSupportedExtensions():
"""
Check if we can access the supported extensions.
These numbers of input/output extensions correspond to the features implemented in common libraries (not in third parties).
@note Tested with ffmpeg-2.4.2
"""
inputExtensions = av.getInputExtensions()
outputExtensions = av.getOutputExtensions()
assert_greater_equal(len(inputExtensions), 162)
assert_greater_equal(len(outputExtensions), 184)