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))
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')
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'))