示例#1
0
 def wrapper(*args, **kwargs):
     try:
         from ..io._io import version
         avcodec_inst = SV(version['FFmpeg']['avcodec'])
         avformat_inst = SV(version['FFmpeg']['avformat'])
         avutil_inst = SV(version['FFmpeg']['avutil'])
         if version_geq is not None:
             avcodec_req, avformat_req, avutil_req = ffmpeg_versions[
                 version_geq]
             if avcodec_inst < avcodec_req:
                 raise SkipTest(
                     'FFMpeg/libav version installed (%s) is smaller than required for this test (%s)'
                     % (version['FFmpeg']['ffmpeg'], version_geq))
         return test(*args, **kwargs)
     except KeyError:
         raise SkipTest('FFMpeg was not available at compile time')
示例#2
0
def ffmpeg_version_lessthan(v):
    '''Returns true if the version of ffmpeg compiled-in is at least the version
  indicated as a string parameter.'''

    from ..io._io import version
    avcodec_inst = SV(version['FFmpeg']['avcodec'])
    avcodec_req = ffmpeg_versions[v][0]
    return avcodec_inst < avcodec_req
示例#3
0
 def test_versions_can_be_strictly_ordered(self):
     self.assertLess(SV('0.1.0a0'), SV('0.1.0a1'))
     self.assertLess(SV('0.1.0a1'), SV('0.1.0a2'))
     self.assertLess(SV('0.1.0a2'), SV('0.1.0a3'))
     self.assertLess(SV('0.1.0a3'), SV('0.1.0'))
     self.assertLess(SV('0.1.0'), SV('0.2.0'))
     self.assertLess(SV('0.1.0'), SV('1.0.0'))
     self.assertLess(SV('0.2.0'), SV('0.3.0'))
     self.assertLess(SV('0.3.0'), SV('0.3.1'))
     self.assertLess(SV('0.3.1'), SV('0.4.0'))
     self.assertLess(SV('0.4.0'), SV('0.4.1'))
     self.assertLess(SV('0.4.1'), SV('0.5.0'))
     self.assertLess(SV('0.5.0'), SV('0.6.0'))
     self.assertLess(SV('0.6.0'), SV('0.6.1'))
     self.assertLess(SV('0.6.1'), SV('0.7.0'))
     self.assertLess(SV('0.7.0'), SV('0.7.1'))
     self.assertLess(SV('0.7.1'), SV('0.7.2'))
     self.assertLess(SV('0.7.2'), SV('0.7.3'))
     self.assertLess(SV('0.7.3'), SV('0.8.0'))
     self.assertLess(SV('0.8.0'), SV('0.8.1'))
     self.assertLess(SV('0.8.1'), SV('0.9.0'))
     self.assertLess(SV('0.9.0'), SV('0.10.0'))
     self.assertLess(SV('0.10.0'), SV('0.11.0'))
     self.assertLess(SV('0.11.0'), SV('0.11.1'))
     self.assertLess(SV('0.11.1'), SV('0.12.0'))
     self.assertLess(SV('0.12.0'), SV('0.13.0'))
     self.assertLess(SV('0.13.0'), SV('0.14.0'))
     self.assertLess(SV('0.14.0'), SV(__version__))
     self.assertLess(SV(__version__), SV('0.14.2'))
示例#4
0
 def test_current_version_is_parsable_as_a_strict_version_number(self):
     SV(__version__)
示例#5
0
from __future__ import unicode_literals

# pylint: disable = E0611,F0401
from distutils.version import StrictVersion as SV
# pylint: enable = E0611,F0401
import sys
import warnings

import pykka

if not (2, 6) <= sys.version_info < (3, ):
    sys.exit('Mopidy requires Python >= 2.6, < 3, but found %s' %
             '.'.join(map(str, sys.version_info[:3])))

if (isinstance(pykka.__version__, basestring)
        and not SV('1.1') <= SV(pykka.__version__) < SV('2.0')):
    sys.exit('Mopidy requires Pykka >= 1.1, < 2, but found %s' %
             pykka.__version__)

warnings.filterwarnings('ignore', 'could not open display')

__version__ = '0.14.2'
示例#6
0
 def test_version_is_grater_than_all_1_x_versions(self):
     self.assertLess(SV('1.999'), SV(spotify.__version__))
示例#7
0
 def test_version_is_a_valid_pep_386_strict_version(self):
     SV(spotify.__version__)
示例#8
0
 def test_module_version_is_a_valid_pep_386_strict_version(self):
     SV(minecraft.__version__)
示例#9
0
 def test_minecraft_version_is_a_valid_pep_386_strict_version(self):
     SV(minecraft.MINECRAFT_VERSION)
示例#10
0
 def test_current_version_is_parsable_as_a_strict_version_number(self):
     SV(get_plain_version())
示例#11
0
 def test_versions_can_be_strictly_ordered(self):
     self.assert_(SV('0.1.0a0') < SV('0.1.0a1'))
     self.assert_(SV('0.1.0a1') < SV('0.1.0a2'))
     self.assert_(SV('0.1.0a2') < SV('0.1.0a3'))
     self.assert_(SV('0.1.0a3') < SV('0.1.0'))
     self.assert_(SV('0.1.0') < SV('0.2.0'))
     self.assert_(SV('0.1.0') < SV('1.0.0'))
     self.assert_(SV('0.2.0') < SV('0.3.0'))
     self.assert_(SV('0.3.0') < SV('0.3.1'))
     self.assert_(SV('0.3.1') < SV('0.4.0'))
     self.assert_(SV('0.4.0') < SV('0.4.1'))
     self.assert_(SV('0.4.1') < SV('0.5.0'))
     self.assert_(SV('0.5.0') < SV(get_plain_version()))
     self.assert_(SV(get_plain_version()) < SV('0.6.1'))
示例#12
0
    return pkg_resources.resource_filename(resource, final_path)


def temporary_filename(prefix='bobtest_', suffix='.hdf5'):
    """Generates a temporary filename to be used in tests"""

    (fd, name) = tempfile.mkstemp(suffix, prefix)
    os.close(fd)
    os.unlink(name)
    return name


# Here is a table of ffmpeg versions against libavcodec, libavformat and
# libavutil versions
ffmpeg_versions = {
    '0.5': [SV('52.20.0'), SV('52.31.0'),
            SV('49.15.0')],
    '0.6': [SV('52.72.2'), SV('52.64.2'),
            SV('50.15.1')],
    '0.7': [SV('52.122.0'), SV('52.110.0'),
            SV('50.43.0')],
    '0.8': [SV('53.7.0'), SV('53.4.0'),
            SV('51.9.1')],
    '0.9': [SV('53.42.0'), SV('53.24.0'),
            SV('51.32.0')],
    '0.10': [SV('53.60.100'),
             SV('53.31.100'),
             SV('51.34.101')],
    '0.11': [SV('54.23.100'), SV('54.6.100'),
             SV('51.54.100')],
    '1.0': [SV('54.59.100'), SV('54.29.104'),
示例#13
0
 def test_versions_can_be_strictly_ordered(self):
     self.assert_(SV('0.1.0a0') < SV('0.1.0a1'))
     self.assert_(SV('0.1.0a1') < SV('0.1.0a2'))
     self.assert_(SV('0.1.0a2') < SV('0.1.0a3'))
     self.assert_(SV('0.1.0a3') < SV('0.1.0'))
     self.assert_(SV('0.1.0') < SV('0.2.0'))
     self.assert_(SV('0.1.0') < SV('1.0.0'))
     self.assert_(SV('0.2.0') < SV('0.3.0'))
     self.assert_(SV('0.3.0') < SV('0.3.1'))
     self.assert_(SV('0.3.1') < SV('0.4.0'))
     self.assert_(SV('0.4.0') < SV('0.4.1'))
     self.assert_(SV('0.4.1') < SV('0.5.0'))
     self.assert_(SV('0.5.0') < SV('0.6.0'))
     self.assert_(SV('0.6.0') < SV('0.6.1'))
     self.assert_(SV('0.6.1') < SV('0.7.0'))
     self.assert_(SV('0.7.0') < SV('0.7.1'))
     self.assert_(SV('0.7.1') < SV('0.7.2'))
     self.assert_(SV('0.7.2') < SV('0.7.3'))
     self.assert_(SV('0.7.3') < SV('0.8.0'))
     self.assert_(SV('0.8.0') < SV(__version__))
     self.assert_(SV(__version__) < SV('0.8.2'))