Esempio n. 1
0
def test_parse():
    semver = Semver()
    semver.parse('5.0.0-alpha.2.2')
    assert semver.major == 5
    assert semver.minor == 0
    assert semver.patch == 0
    assert semver.prefix == '-'
    assert semver.tag == 'alpha'
    assert semver.number == 2
    assert semver.revision == '2'
Esempio n. 2
0
def test_next_build():
    semver = Semver(tag='build', number=1, revision='a2345')
    next = semver.next()
    assert str(next) == '0.0.0+build.2'
Esempio n. 3
0
def test_next_beta():
    semver = Semver(tag='beta', number=1)
    next = semver.next()
    assert str(next) == '0.0.0-beta.2'
Esempio n. 4
0
def test_next():
    semver = Semver()
    next = semver.next()
    assert str(next) == '0.0.1'
Esempio n. 5
0
def test_bad():
    semver = Semver()
    semver.parse('5.0-alpha.2.2')