Пример #1
0
 def test_selects_highest_revision_when_not_sorted(self):
   self.given_job_with_builds(build(2), build([1, 7, 3]), build(4))
   self.given_job_with_builds(build(6), build(2), build(5))
   self.assertEqual(7, find_last_stable_revision.find_revision("url"))
Пример #2
0
 def test_does_not_selects_revision_when_none_built(self):
   self.given_job_with_builds()
   self.given_job_with_builds()
   self.assertEqual(-1, find_last_stable_revision.find_revision("url"))
Пример #3
0
 def test_selects_highest_revision_when_multiple_changes(self):
   self.given_job_with_builds(build([3, 2, 1]))
   self.assertEqual(3, find_last_stable_revision.find_revision("url"))
Пример #4
0
 def test_selects_revision_even_if_not_built(self):
   self.given_job_with_builds(build(1))
   self.given_job_with_builds()
   self.assertEqual(1, find_last_stable_revision.find_revision("url"))
Пример #5
0
 def test_selects_highest_stable_revision(self):
   self.given_job_with_builds(build(3), build(1))
   self.given_job_with_builds(build(2), build(1))
   self.assertEqual(3, find_last_stable_revision.find_revision("url"))
Пример #6
0
 def test_selects_stable_revision_after_unstable_build(self):
   self.given_job_with_builds(build(2), build(1))
   self.given_job_with_builds(build(3), build(2, stable=False), build(1))
   self.assertEqual(3, find_last_stable_revision.find_revision("url"))
Пример #7
0
 def test_does_not_select_unstable_revision(self):
   self.given_job_with_builds(build(2), build(1))
   self.given_job_with_builds(build(2, stable=False), build(1))
   self.assertEqual(1, find_last_stable_revision.find_revision("url"))
Пример #8
0
 def test_does_not_select_revision_after_buildling_revision(self):
   self.given_job_with_builds(build(3), build(1))
   self.given_job_with_builds(build(2, building=True), build(1))
   self.assertEqual(1, find_last_stable_revision.find_revision("url"))