Ejemplo n.º 1
0
    def test_08(self):
        """
        Test Case 08:
        Test :py:func:`~magrathea.utils.version.get_version` with a too long version tuple.

        Test is passed if :py:exc:`AssertionError` is raised
        """
        version = (0, 1, 0, 'final', 0, 1)
        with self.assertRaises(AssertionError):
            get_version(version=version)
Ejemplo n.º 2
0
    def test_09(self):
        """
        Test Case 09:
        Test :py:func:`~magrathea.utils.version.get_version` with an invalid version status designator.

        Test is passed if :py:exc:`AssertionError` is raised
        """
        version = (0, 1, 0, 'release', 0)
        with self.assertRaises(AssertionError):
            get_version(version=version)
Ejemplo n.º 3
0
    def test_06(self):
        """
        Test Case 06:
        Test :py:func:`~magrathea.utils.version.get_version` with an rc version with suffix.

        Test is passed if returned result meets expected string
        """
        version = (0, 1, 0, 'candidate', 1)
        result = get_version(version=version)
        self.assertEqual(result, '0.1c1')
Ejemplo n.º 4
0
    def test_04(self):
        """
        Test Case 04:
        Test :py:func:`~magrathea.utils.version.get_version` with an alpha version with suffix.

        Test is passed if returned result meets expected string
        """
        version = (0, 1, 0, 'alpha', 1)
        result = get_version(version=version)
        self.assertEqual(result, '0.1a1')
Ejemplo n.º 5
0
    def test_03(self):
        """
        Test Case 03:
        Test :py:func:`~magrathea.utils.version.get_version` with an alpha version without suffix.

        Test is passed if returned result meets expected string pattern
        """
        version = (0, 1, 0, 'alpha', 0)
        result = get_version(version=version)
        self.assertRegexpMatches(result, r'^0\.1\.dev\d{14}$')
Ejemplo n.º 6
0
    def test_02(self):
        """
        Test Case 02:
        Test :py:func:`~magrathea.utils.version.get_version` with a release version with patch level.

        Test is passed if returned result meets expected string
        """
        version = (0, 1, 1, 'final', 0)
        result = get_version(version=version)
        self.assertEqual(result, '0.1.1')