예제 #1
0
 def test_from_pod_old_style(self):
     """Validate from_pod is still compatible with the older pod style."""
     self.assertEqual(
         VersionSplitPackageOrder(first_version=Version("1.2.3")),
         from_pod(("version_split", {
             "first_version": "1.2.3"
         })))
예제 #2
0
        def _test(orderer, package_name, expected_order):
            it = iter_packages(package_name)
            descending = sorted(it, key=lambda x: x.version, reverse=True)

            pod = to_pod(orderer)
            orderer2 = from_pod(pod)

            for orderer_ in (orderer, orderer2):
                ordered = orderer_.reorder(descending)
                result = [str(x.version) for x in ordered]
                self.assertEqual(result, expected_order)
예제 #3
0
        def _test(orderer, package_name, expected_order):
            it = iter_packages(package_name)
            descending = sorted(it, key=lambda x: x.version, reverse=True)

            pod = to_pod(orderer)
            orderer2 = from_pod(pod)

            for orderer_ in (orderer, orderer2):
                ordered = orderer_.reorder(descending)
                result = [str(x.version) for x in ordered]
                self.assertEqual(result, expected_order)