Пример #1
0
def test_version_set(value):
    v = Version()
    v.set(value)
    assert v.components == (0, 3, 0)
Пример #2
0
def test_version_bump_invalid_type():
    v = Version()
    with raises(ValueError, match="Invalid bump_type 'patch'"):
        v.bump('patch')
Пример #3
0
def test_version_bump_invalid_type_name():
    v = Version()
    with raises(ValueError, match="Unknown bump_type 'pico'"):
        v.bump('pico')
Пример #4
0
def test_four_component_micro_bump(v1, v2):
    start = Version(v1)
    start.bump_micro()
    assert start == Version(v2)
Пример #5
0
def test_four_component_patch_bump(v1, v2):
    start = Version(v1)
    start.bump_patch()
    assert start == Version(v2)
Пример #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')
Пример #7
0
def test_two_component_minor_bump(v1, v2):
    start = Version(v1)
    start.bump_minor()
    assert start == Version(v2)
Пример #8
0
def test_micro_bumps(v1, v2):
    start = Version(v1)
    start.bump_micro()
    expect(start) == Version(v2)
Пример #9
0
def test_patch_bumps(v1, v2):
    start = Version(v1)
    start.bump_patch()
    expect(start) == Version(v2)
Пример #10
0
def test_major_bumps(v1, v2):
    start = Version(v1)
    start.bump_major()
    expect(start) == Version(v2)
Пример #11
0
def test_patch_bumps(v1, v2):
    start = Version(v1)
    start.bump_patch()
    assert start == Version(v2)
Пример #12
0
def test_micro_bumps(v1, v2):
    start = Version(v1)
    start.bump_micro()
    assert start == Version(v2)
Пример #13
0
def test_minor_bumps(v1, v2):
    start = Version(v1)
    start.bump_minor()
    assert start == Version(v2)
Пример #14
0
def test_version_set(value):
    v = Version()
    v.set(value)
    expect(v.components) == (0, 3, 0)