Beispiel #1
0
 def test_first_in_series_keyerror(self):
     deliverable_info = {}
     self.assertEqual({'version': '1.0.1'},
                      new_release.get_last_release(
                          deliverable_info,
                          'anyseries',
                          'anydeliverable',
                          'feature',
                      ))
Beispiel #2
0
 def test_empty_release_list(self):
     deliverable_info = {
         'releases': [],
     }
     self.assertEqual({'version': '1.0.1'},
                      new_release.get_last_release(
                          deliverable_info,
                          'anyseries',
                          'anydeliverable',
                          'feature',
                      ))
 def test_last_release_in_previous(self):
     release_history = [
         [],
         [
             {'version': '1.0.0'},
         ],
     ]
     last = new_release.get_last_release(
         release_history,
         'anydeliverable',
         'feature',
     )
     self.assertEqual(1, new_release.feature_increment(last))
 def test_previous_was_skipped(self):
     release_history = [
         [],
         [],
         [
             {'version': '1.1.3'},
         ],
     ]
     last = new_release.get_last_release(
         release_history,
         'anydeliverable',
         'feature',
     )
     self.assertEqual(2, new_release.feature_increment(last))
 def test_existing_releases(self):
     release_history = [
         [
             {'version': '1.0.0'},
         ],
     ]
     self.assertEqual(
         {'version': '1.0.0', 'depth': 0},
         new_release.get_last_release(
             release_history,
             'anydeliverable',
             'bugfix',
         )
     )
Beispiel #6
0
 def test_existing_releases(self):
     deliverable_info = {
         'releases': [
             {
                 'version': '1.0.0'
             },
         ],
     }
     self.assertEqual({'version': '1.0.0'},
                      new_release.get_last_release(
                          deliverable_info,
                          'anyseries',
                          'anydeliverable',
                          'bugfix',
                      ))
 def test_last_release_in_older_series(self):
     release_history = [
         [],
         [],
         [
             {'version': '1.0.0'},
         ],
     ]
     self.assertEqual(
         {'version': '1.0.0', 'depth': 2},
         new_release.get_last_release(
             release_history,
             'anydeliverable',
             'feature',
         )
     )
 def test_empty_release_list(self):
     release_history = [
         [],
         [
             {'version': '1.0.0'},
             {'version': '1.0.1'},
         ],
     ]
     self.assertEqual(
         {'version': '1.0.1', 'depth': 1},
         new_release.get_last_release(
             release_history,
             'anydeliverable',
             'feature',
         )
     )