Beispiel #1
0
def test_pypy3():
    versions = '2.7.0', '3.6.0', '3.7.0', 'pypy2.7-6.0.0', 'pypy3.5-5.0.0', 'pypy3.5-6.0.0'
    version = plugin.best_version('pypy3.5', versions)
    assert version == 'pypy3.5-6.0.0'
Beispiel #2
0
def test_pypy3_not_found():
    versions = '2.7.0', '3.6.0', '3.7.0', 'pypy2.7-6.0.0'
    assert plugin.best_version('pypy3.5', versions) is None
Beispiel #3
0
def test_not_found(version):
    versions = '2.7.0', '3.5.0', '3.6.0', '3.6.1', '3.6.2', '3.6.3', '3.7.0'
    assert plugin.best_version('2.6', versions) is None
Beispiel #4
0
def test_only_one_minor():
    versions = '2.7.0', '3.5.0', '3.6.0', '3.7.0'
    version = plugin.best_version('3.6', versions)
    assert version == '3.6.0'
Beispiel #5
0
def test_dev_only():
    versions = '2.7.0', '3.5.0', '3.6-dev'
    version = plugin.best_version('3.6', versions)
    assert version == '3.6-dev'
Beispiel #6
0
def test_dev_suffix():
    versions = '2.7.0', '3.5.0', '3.6-dev', '3.6.0', '3.7.0'
    version = plugin.best_version('3.6', versions)
    assert version == '3.6.0'
Beispiel #7
0
def test_multiple_digits():
    versions = '2.7.0', '3.5.0', '3.6.0', '3.6.1', '3.6.10', '3.6.11', '3.7.0'
    version = plugin.best_version('3.6', versions)
    assert version == '3.6.11'
Beispiel #8
0
def test_best_patch_not_alphabetical():
    versions = '2.7.9', '2.7.17'
    version = plugin.best_version('2.7', versions)
    assert version == '2.7.17'
Beispiel #9
0
def test_best_patch():
    versions = '2.7.0', '3.5.0', '3.6.0', '3.6.1', '3.6.2', '3.6.3', '3.7.0'
    version = plugin.best_version('3.6', versions)
    assert version == '3.6.3'