Пример #1
0
    def test_given_list_of_complex_releases_then_return_latest_version(self):

        releases = ['1-3-5dls7', '2-3-5dls7', '2-3-4dls8', '2-3-5dls8']
        expected_version = releases[-1]

        version = dls_release.get_last_release(releases)

        self.assertEqual(version, expected_version)
Пример #2
0
    def test_given_list_of_one_release_number_then_return_that_number(self):

        releases = ['1-5-3-4']
        expected_version = releases[0]

        version = dls_release.get_last_release(releases)

        self.assertEqual(version, expected_version)
Пример #3
0
    def test_given_list_of_complex_releases_then_return_latest_version(self):

        releases = ['1-3-5dls7', '2-3-5dls7', '2-3-4dls8', '2-3-5dls8']
        expected_version = releases[-1]

        version = dls_release.get_last_release(releases)

        self.assertEqual(version, expected_version)
Пример #4
0
    def test_given_list_of_releases_with_diff_major_number_then_return_latest_version(self):

        releases = ['1-0', '3-0', '2-0']
        expected_version = releases[1]

        version = dls_release.get_last_release(releases)

        self.assertEqual(version, expected_version)
Пример #5
0
    def test_given_list_of_one_release_number_then_return_that_number(self):

        releases = ['1-5-3-4']
        expected_version = releases[0]

        version = dls_release.get_last_release(releases)

        self.assertEqual(version, expected_version)
Пример #6
0
    def test_given_list_of_releases_with_diff_major_number_then_return_latest_version(
            self):

        releases = ['1-0', '3-0', '2-0']
        expected_version = releases[1]

        version = dls_release.get_last_release(releases)

        self.assertEqual(version, expected_version)