예제 #1
0
    def test_ok_01(self):
        packageversion_list = [(1, 0), (1, 0)]
        required = [[(1, 0)], [(1, 0)]]

        self.assertEqual(pv.checkAllPackagesVersions(packageversion_list,
                                                     required),
                         pv.VERSION_OK)
예제 #2
0
    def test_fail_04(self):
        packageversion_list = [(1, 0), (2, 0)]
        required = [[(1, 0)], [(1, 0)]]

        self.assertEqual(pv.checkAllPackagesVersions(packageversion_list,
                                                     required),
                         pv.PLUGIN_MUST_BE_UPGRADED)
예제 #3
0
    def test_fail_03(self):
        packageversion_list = [(1, 0), (1, 0)]
        required = [[(1, 0)], [(1, 1)]]

        self.assertEqual(pv.checkAllPackagesVersions(packageversion_list,
                                                     required),
                         pv.OUTWIKER_MUST_BE_UPGRADED)
예제 #4
0
    def test_ok_01(self):
        packageversion_list = [(1, 0), (1, 0)]
        required = [[(1, 0)], [(1, 0)]]

        self.assertEqual(
            pv.checkAllPackagesVersions(packageversion_list, required),
            pv.VERSION_OK)
예제 #5
0
    def test_fail_04(self):
        packageversion_list = [(1, 0), (2, 0)]
        required = [[(1, 0)], [(1, 0)]]

        self.assertEqual(
            pv.checkAllPackagesVersions(packageversion_list, required),
            pv.PLUGIN_MUST_BE_UPGRADED)
예제 #6
0
    def test_fail_03(self):
        packageversion_list = [(1, 0), (1, 0)]
        required = [[(1, 0)], [(1, 1)]]

        self.assertEqual(
            pv.checkAllPackagesVersions(packageversion_list, required),
            pv.OUTWIKER_MUST_BE_UPGRADED)
예제 #7
0
    def __checkPackageVersions(self, appinfo):
        if appinfo is None:
            return pv.PLUGIN_MUST_BE_UPGRADED

        required_versions = [
            appinfo.requirements.packages_versions.get('core', [(1, 0)]),
            appinfo.requirements.packages_versions.get(u'gui', [(1, 0)]),
            appinfo.requirements.packages_versions.get(u'pages', [(1, 0)]),
            appinfo.requirements.packages_versions.get(u'actions', [(1, 0)]),
            appinfo.requirements.packages_versions.get(u'utilites', [(1, 0)]),
            appinfo.requirements.packages_versions.get(u'libs', [(1, 0)]),
        ]

        return pv.checkAllPackagesVersions(self.__currentPackageVersions,
                                           required_versions)
예제 #8
0
    def __checkPackageVersions(self, appinfo):
        if appinfo is None:
            return pv.PLUGIN_MUST_BE_UPGRADED

        required_versions = [
            appinfo.requirements.packages_versions.get('core', [(1, 0)]),
            appinfo.requirements.packages_versions.get(u'gui', [(1, 0)]),
            appinfo.requirements.packages_versions.get(u'pages', [(1, 0)]),
            appinfo.requirements.packages_versions.get(u'actions', [(1, 0)]),
            appinfo.requirements.packages_versions.get(u'utilites', [(1, 0)]),
            appinfo.requirements.packages_versions.get(u'libs', [(1, 0)]),
        ]

        return pv.checkAllPackagesVersions(self.__currentPackageVersions,
                                           required_versions)