示例#1
0
def test_spec_tuple_match():
    spec = AsdfSpec('>=1.1.0')

    assert spec.match((1,1,0))
    assert spec.match((1,2,0))
    assert not spec.match((1,0,0))
    assert not spec.match((1,0,9))
示例#2
0
def test_spec_string_match():
    spec = AsdfSpec('>=1.1.0')

    assert spec.match('1.1.0')
    assert spec.match('1.2.0')
    assert not spec.match('1.0.0')
    assert not spec.match('1.0.9')
示例#3
0
def test_spec_version_match():
    spec = AsdfSpec('>=1.1.0')

    assert spec.match(AsdfVersion('1.1.0'))
    assert spec.match(AsdfVersion('1.2.0'))
    assert not spec.match(AsdfVersion('1.0.0'))
    assert not spec.match(AsdfVersion('1.0.9'))
示例#4
0
def test_spec_tuple_match():
    spec = AsdfSpec('>=1.1.0')

    assert spec.match((1,1,0))
    assert spec.match((1,2,0))
    assert not spec.match((1,0,0))
    assert not spec.match((1,0,9))
示例#5
0
def test_spec_string_match():
    spec = AsdfSpec('>=1.1.0')

    assert spec.match('1.1.0')
    assert spec.match('1.2.0')
    assert not spec.match('1.0.0')
    assert not spec.match('1.0.9')
示例#6
0
def test_spec_version_match():
    spec = AsdfSpec('>=1.1.0')

    assert spec.match(AsdfVersion('1.1.0'))
    assert spec.match(AsdfVersion('1.2.0'))
    assert not spec.match(AsdfVersion('1.0.0'))
    assert not spec.match(AsdfVersion('1.0.9'))