Exemple #1
0
    def test_maybe_support_for_empty(self):
        # Arrange
        # No classifiers
        classifiers = []

        # Act
        has_support = utils.classifiers_support(classifiers, "2.6")

        # Assert
        self.assertEqual(has_support, "maybe")
Exemple #2
0
    def test_maybe_support_or_any_major_minor(self):
        # Arrange
        # No major.minor classifiers
        classifiers = [
            "Programming Language :: Python :: 2",
            "Programming Language :: Python :: 3",
        ]

        # Act
        has_support = utils.classifiers_support(classifiers, "2.6")

        # Assert
        self.assertEqual(has_support, "maybe")
Exemple #3
0
    def test_no_support_but_other_2x_are(self):
        # Arrange
        classifiers = [
            "Programming Language :: Python",
            "Programming Language :: Python :: 2",
            "Programming Language :: Python :: 2.7",
        ]

        # Act
        has_support = utils.classifiers_support(classifiers, "2.6")

        # Assert
        self.assertEqual(has_support, "no")
Exemple #4
0
    def test_maybe_support_for_2x(self):
        # Arrange
        # We have major but no major.minor
        classifiers = [
            "Programming Language :: Python",
            "Programming Language :: Python :: 3",
        ]

        # Act
        has_support = utils.classifiers_support(classifiers, "2.6")

        # Assert
        self.assertEqual(has_support, "maybe")
Exemple #5
0
    def test_no_support_but_other_3x_are(self):
        # Arrange
        classifiers = [
            "Programming Language :: Python",
            "Programming Language :: Python :: 3",
            "Programming Language :: Python :: 3.4",
            "Programming Language :: Python :: 3.5",
            "Programming Language :: Python :: 3.6",
        ]

        # Act
        has_support = utils.classifiers_support(classifiers, "2.6")

        # Assert
        self.assertEqual(has_support, "maybe")
Exemple #6
0
    def test_has_support(self):
        # Arrange
        classifiers = [
            "Programming Language :: Python",
            "Programming Language :: Python :: 2",
            "Programming Language :: Python :: 2.6",
            "Programming Language :: Python :: 2.7",
            "Programming Language :: Python :: 3",
            "Programming Language :: Python :: 3.3",
            "Programming Language :: Python :: 3.4",
            "Programming Language :: Python :: 3.5",
            "Programming Language :: Python :: 3.6",
        ]

        # Act
        has_support = utils.classifiers_support(classifiers, "2.6")

        # Assert
        self.assertEqual(has_support, "yes")