Exemple #1
0
    def test_bump(self, current, bump_part, expected, stages):
        with mock_patch.object(Version, "stages", stages):
            version = Version(current)
            new_version = version.bump(bump_part)

            assert new_version == Version(expected)
            assert new_version is not version
Exemple #2
0
 def test_invalid_bump(self, current, bump_part, message, stages):
     with mock_patch.object(Version, "stages", stages):
         with pytest.raises(ValueError, match=message):
             version = Version(current)
             version.bump(bump_part)