Ejemplo n.º 1
0
 def next_minor_of_feature_release(self):
     versions = _latest_and_next_version(
         Lexicon({
             'release_type': Release.FEATURE,
             'latest_line_release': None,  # realism!
             'latest_overall_release': Version('1.2.2'),
         }))
     assert versions == (Version('1.2.2'), Version('1.3.0'))
Ejemplo n.º 2
0
 def next_patch_of_bugfix_release(self):
     versions = _latest_and_next_version(
         Lexicon({
             'release_type': Release.BUGFIX,
             'latest_line_release': Version('1.2.2'),
             'latest_overall_release': Version('1.4.1'),  # realism!
         }))
     assert versions == (Version('1.2.2'), Version('1.2.3'))
Ejemplo n.º 3
0
 def next_minor_of_feature_release(self):
     versions = _latest_and_next_version(
         Lexicon(
             {
                 "release_type": Release.FEATURE,
                 "latest_line_release": None,  # realism!
                 "latest_overall_release": Version("1.2.2"),
             }
         )
     )
     assert versions == (Version("1.2.2"), Version("1.3.0"))
Ejemplo n.º 4
0
 def next_patch_of_bugfix_release(self):
     versions = _latest_and_next_version(
         Lexicon(
             {
                 "release_type": Release.BUGFIX,
                 "latest_line_release": Version("1.2.2"),
                 "latest_overall_release": Version("1.4.1"),  # realism!
             }
         )
     )
     assert versions == (Version("1.2.2"), Version("1.2.3"))
Ejemplo n.º 5
0
 def returns_lexica_for_reuse(self):
     actions = Lexicon(
         changelog=Changelog.NEEDS_RELEASE,
         version=VersionFile.NEEDS_BUMP,
         tag=Tag.NEEDS_CUTTING,
     )
     found_actions, found_state = _mock_status(self)
     assert found_actions == actions
     # Spot check state, don't need to check whole thing...
     assert found_state.branch == self._branch
     assert found_state.latest_version == Version("1.1.1")
     assert found_state.tags == [Version(x) for x in self._tags]
Ejemplo n.º 6
0
 def returns_lexica_for_reuse(self):
     actions = Lexicon(
         changelog=Changelog.NEEDS_RELEASE,
         version=VersionFile.NEEDS_BUMP,
         tag=Tag.NEEDS_CUTTING,
     )
     found_actions, found_state = _mock_status(self)
     eq_(found_actions, actions)
     # Spot check state, don't need to check whole thing...
     eq_(found_state.branch, self._branch)
     eq_(found_state.latest_version, Version('1.1.1'))
     eq_(found_state.tags, [Version(x) for x in self._tags])