def test_version_set(value): v = Version() v.set(value) assert v.components == (0, 3, 0)
def test_version_bump_invalid_type(): v = Version() with raises(ValueError, match="Invalid bump_type 'patch'"): v.bump('patch')
def test_version_bump_invalid_type_name(): v = Version() with raises(ValueError, match="Unknown bump_type 'pico'"): v.bump('pico')
def test_four_component_micro_bump(v1, v2): start = Version(v1) start.bump_micro() assert start == Version(v2)
def test_four_component_patch_bump(v1, v2): start = Version(v1) start.bump_patch() assert start == Version(v2)
def test_version_bump_invalid_type(): v = Version() with expect.raises(ValueError, "Invalid bump_type 'patch' for version (0, 1, 0)"): v.bump('patch')
def test_two_component_minor_bump(v1, v2): start = Version(v1) start.bump_minor() assert start == Version(v2)
def test_micro_bumps(v1, v2): start = Version(v1) start.bump_micro() expect(start) == Version(v2)
def test_patch_bumps(v1, v2): start = Version(v1) start.bump_patch() expect(start) == Version(v2)
def test_major_bumps(v1, v2): start = Version(v1) start.bump_major() expect(start) == Version(v2)
def test_patch_bumps(v1, v2): start = Version(v1) start.bump_patch() assert start == Version(v2)
def test_micro_bumps(v1, v2): start = Version(v1) start.bump_micro() assert start == Version(v2)
def test_minor_bumps(v1, v2): start = Version(v1) start.bump_minor() assert start == Version(v2)
def test_version_set(value): v = Version() v.set(value) expect(v.components) == (0, 3, 0)