Exemplo n.º 1
0
def test_is_beta():
    assert not utils.is_beta('1.2')

    assert utils.is_beta('1.2a')
    assert utils.is_beta('1.2a1')
    assert utils.is_beta('1.2a123')
    assert utils.is_beta('1.2a.1')
    assert utils.is_beta('1.2a.123')
    assert utils.is_beta('1.2a-1')
    assert utils.is_beta('1.2a-123')

    assert utils.is_beta('1.2alpha')
    assert utils.is_beta('1.2alpha')
    assert utils.is_beta('1.2alpha1')
    assert utils.is_beta('1.2alpha123')
    assert utils.is_beta('1.2alpha.1')
    assert utils.is_beta('1.2alpha.123')
    assert utils.is_beta('1.2alpha-1')
    assert utils.is_beta('1.2alpha-123')

    assert utils.is_beta('1.2b')
    assert utils.is_beta('1.2b1')
    assert utils.is_beta('1.2b123')
    assert utils.is_beta('1.2b.1')
    assert utils.is_beta('1.2b.123')
    assert utils.is_beta('1.2b-1')
    assert utils.is_beta('1.2b-123')

    assert utils.is_beta('1.2beta')
    assert utils.is_beta('1.2beta1')
    assert utils.is_beta('1.2beta123')
    assert utils.is_beta('1.2beta.1')
    assert utils.is_beta('1.2beta.123')
    assert utils.is_beta('1.2beta-1')
    assert utils.is_beta('1.2beta-123')

    assert utils.is_beta('1.2pre')
    assert utils.is_beta('1.2pre1')
    assert utils.is_beta('1.2pre123')
    assert utils.is_beta('1.2pre.1')
    assert utils.is_beta('1.2pre.123')
    assert utils.is_beta('1.2pre-1')
    assert utils.is_beta('1.2pre-123')

    assert utils.is_beta('1.2rc')
    assert utils.is_beta('1.2rc1')
    assert utils.is_beta('1.2rc123')
    assert utils.is_beta('1.2rc.1')
    assert utils.is_beta('1.2rc.123')
    assert utils.is_beta('1.2rc-1')
    assert utils.is_beta('1.2rc-123')
Exemplo n.º 2
0
def test_is_beta():
    assert not is_beta('1.2')
    assert is_beta('1.2a')
    assert is_beta('1.2alpha')
    assert is_beta('1.2a1')
    assert is_beta('1.2alpha1')
    assert is_beta('1.2a123')
    assert is_beta('1.2alpha123')
    assert is_beta('1.2b')
    assert is_beta('1.2beta')
    assert is_beta('1.2b1')
    assert is_beta('1.2beta1')
    assert is_beta('1.2b123')
    assert is_beta('1.2blpha123')
Exemplo n.º 3
0
def test_is_beta():
    assert not is_beta('1.2')
    assert is_beta('1.2a')
    assert is_beta('1.2alpha')
    assert is_beta('1.2a1')
    assert is_beta('1.2alpha1')
    assert is_beta('1.2a123')
    assert is_beta('1.2alpha123')
    assert is_beta('1.2b')
    assert is_beta('1.2beta')
    assert is_beta('1.2b1')
    assert is_beta('1.2beta1')
    assert is_beta('1.2b123')
    assert is_beta('1.2blpha123')
Exemplo n.º 4
0
def test_is_beta():
    assert not utils.is_beta('1.2')

    assert utils.is_beta('1.2a')
    assert utils.is_beta('1.2a1')
    assert utils.is_beta('1.2a123')
    assert utils.is_beta('1.2a.1')
    assert utils.is_beta('1.2a.123')
    assert utils.is_beta('1.2a-1')
    assert utils.is_beta('1.2a-123')

    assert utils.is_beta('1.2alpha')
    assert utils.is_beta('1.2alpha')
    assert utils.is_beta('1.2alpha1')
    assert utils.is_beta('1.2alpha123')
    assert utils.is_beta('1.2alpha.1')
    assert utils.is_beta('1.2alpha.123')
    assert utils.is_beta('1.2alpha-1')
    assert utils.is_beta('1.2alpha-123')

    assert utils.is_beta('1.2b')
    assert utils.is_beta('1.2b1')
    assert utils.is_beta('1.2b123')
    assert utils.is_beta('1.2b.1')
    assert utils.is_beta('1.2b.123')
    assert utils.is_beta('1.2b-1')
    assert utils.is_beta('1.2b-123')

    assert utils.is_beta('1.2beta')
    assert utils.is_beta('1.2beta1')
    assert utils.is_beta('1.2beta123')
    assert utils.is_beta('1.2beta.1')
    assert utils.is_beta('1.2beta.123')
    assert utils.is_beta('1.2beta-1')
    assert utils.is_beta('1.2beta-123')

    assert utils.is_beta('1.2pre')
    assert utils.is_beta('1.2pre1')
    assert utils.is_beta('1.2pre123')
    assert utils.is_beta('1.2pre.1')
    assert utils.is_beta('1.2pre.123')
    assert utils.is_beta('1.2pre-1')
    assert utils.is_beta('1.2pre-123')

    assert utils.is_beta('1.2rc')
    assert utils.is_beta('1.2rc1')
    assert utils.is_beta('1.2rc123')
    assert utils.is_beta('1.2rc.1')
    assert utils.is_beta('1.2rc.123')
    assert utils.is_beta('1.2rc-1')
    assert utils.is_beta('1.2rc-123')
Exemplo n.º 5
0
def test_is_beta():
    assert not is_beta("1.2")

    assert is_beta("1.2a")
    assert is_beta("1.2a1")
    assert is_beta("1.2a123")
    assert is_beta("1.2a.1")
    assert is_beta("1.2a.123")
    assert is_beta("1.2a-1")
    assert is_beta("1.2a-123")

    assert is_beta("1.2alpha")
    assert is_beta("1.2alpha")
    assert is_beta("1.2alpha1")
    assert is_beta("1.2alpha123")
    assert is_beta("1.2alpha.1")
    assert is_beta("1.2alpha.123")
    assert is_beta("1.2alpha-1")
    assert is_beta("1.2alpha-123")

    assert is_beta("1.2b")
    assert is_beta("1.2b1")
    assert is_beta("1.2b123")
    assert is_beta("1.2b.1")
    assert is_beta("1.2b.123")
    assert is_beta("1.2b-1")
    assert is_beta("1.2b-123")

    assert is_beta("1.2beta")
    assert is_beta("1.2beta1")
    assert is_beta("1.2beta123")
    assert is_beta("1.2beta.1")
    assert is_beta("1.2beta.123")
    assert is_beta("1.2beta-1")
    assert is_beta("1.2beta-123")

    assert is_beta("1.2pre")
    assert is_beta("1.2pre1")
    assert is_beta("1.2pre123")
    assert is_beta("1.2pre.1")
    assert is_beta("1.2pre.123")
    assert is_beta("1.2pre-1")
    assert is_beta("1.2pre-123")

    assert is_beta("1.2rc")
    assert is_beta("1.2rc1")
    assert is_beta("1.2rc123")
    assert is_beta("1.2rc.1")
    assert is_beta("1.2rc.123")
    assert is_beta("1.2rc-1")
    assert is_beta("1.2rc-123")