Example #1
0
def test_version_set(value):
    v = Version()
    v.set(value)
    assert v.components == (0, 3, 0)
Example #2
0
def test_version_bump_invalid_type():
    v = Version()
    with raises(ValueError, match="Invalid bump_type 'patch'"):
        v.bump('patch')
Example #3
0
def test_version_bump_invalid_type_name():
    v = Version()
    with raises(ValueError, match="Unknown bump_type 'pico'"):
        v.bump('pico')
Example #4
0
def test_four_component_micro_bump(v1, v2):
    start = Version(v1)
    start.bump_micro()
    assert start == Version(v2)
Example #5
0
def test_four_component_patch_bump(v1, v2):
    start = Version(v1)
    start.bump_patch()
    assert start == Version(v2)
Example #6
0
def test_version_bump_invalid_type():
    v = Version()
    with expect.raises(ValueError,
                       "Invalid bump_type 'patch' for version (0, 1, 0)"):
        v.bump('patch')
Example #7
0
def test_two_component_minor_bump(v1, v2):
    start = Version(v1)
    start.bump_minor()
    assert start == Version(v2)
Example #8
0
def test_micro_bumps(v1, v2):
    start = Version(v1)
    start.bump_micro()
    expect(start) == Version(v2)
Example #9
0
def test_patch_bumps(v1, v2):
    start = Version(v1)
    start.bump_patch()
    expect(start) == Version(v2)
Example #10
0
def test_major_bumps(v1, v2):
    start = Version(v1)
    start.bump_major()
    expect(start) == Version(v2)
Example #11
0
def test_patch_bumps(v1, v2):
    start = Version(v1)
    start.bump_patch()
    assert start == Version(v2)
Example #12
0
def test_micro_bumps(v1, v2):
    start = Version(v1)
    start.bump_micro()
    assert start == Version(v2)
Example #13
0
def test_minor_bumps(v1, v2):
    start = Version(v1)
    start.bump_minor()
    assert start == Version(v2)
Example #14
0
def test_version_set(value):
    v = Version()
    v.set(value)
    expect(v.components) == (0, 3, 0)