def test_should_raise_value_error_for_invalid_version_schema(self): # given invalid_version = 'dev.0.1' # then with self.assertRaises(ValueError): # when bump_minor(invalid_version)
def test_should_bump_minor_(self): for fr, to in [ # full version ("1.0.0", "1.1"), ("0.1.0", "0.2"), ("0.1.1", "0.2"), ("0.0.1", "0.1"), ("0.1.dev1", "0.2"), # only major ("0", "0.1"), ("12", "12.1"), # preserve prefix ("v10.1", "v10.2"), ]: self.assertEqual(bump_minor(fr), to)
def test_should_bump_minor_(self): self.assertEqual(bump_minor('1.0.0'), '1.1.0') self.assertEqual(bump_minor('0.1.0'), '0.2.0') self.assertEqual(bump_minor('0.1.1'), '0.2.0') self.assertEqual(bump_minor('0.0.1'), '0.1.0') self.assertEqual(bump_minor('0.1.dev1'), '0.2.0')