コード例 #1
0
    def test_sys_deps(self):
        '''deps ommitted because satisfied by system dependencies'''
        class TestBranch(jhbuild.versioncontrol.tarball.TarballBranch):
            version = None

            def __init__(self):
                pass

        self.moduleset.add(Package('syspkgalpha'))
        self.moduleset.modules['foo'].dependencies = ['bar']
        self.moduleset.modules['bar'].dependencies = ['syspkgalpha']
        self.moduleset.modules['syspkgalpha'].dependencies = ['baz']
        self.moduleset.modules['syspkgalpha'].pkg_config = 'syspkgalpha.pc'
        self.moduleset.modules['syspkgalpha'].branch = TestBranch()
        self.moduleset.modules['syspkgalpha'].branch.version = '3'
        self.assertEqual(self.get_module_list(['foo']),
                         ['baz', 'syspkgalpha', 'bar', 'foo'])
        self.moduleset.modules['syspkgalpha'].branch.version = '3.1'
        self.assertEqual(self.get_module_list(['foo']),
                         ['baz', 'syspkgalpha', 'bar', 'foo'])
        self.moduleset.modules['syspkgalpha'].branch.version = '2'
        self.assertEqual(self.get_module_list(['foo']), ['baz', 'bar', 'foo'])
        self.moduleset.modules['syspkgalpha'].branch.version = '1'
        self.assertEqual(self.get_module_list(['foo']), ['baz', 'bar', 'foo'])
        self.moduleset.modules['syspkgalpha'].branch.version = '1.1'
        self.assertEqual(self.get_module_list(['foo']), ['baz', 'bar', 'foo'])

        self.moduleset.add(Package('syspkgbravo'))
        self.moduleset.modules['foo'].dependencies = ['bar']
        self.moduleset.modules['bar'].dependencies = ['syspkgbravo']
        self.moduleset.modules['syspkgbravo'].dependencies = ['baz']
        self.moduleset.modules['syspkgbravo'].pkg_config = 'syspkgbravo.pc'
        self.moduleset.modules['syspkgbravo'].branch = TestBranch()
        self.moduleset.modules['syspkgbravo'].branch.version = '3'
        self.assertEqual(self.get_module_list(['foo']), ['baz', 'bar', 'foo'])
        self.moduleset.modules['syspkgbravo'].branch.version = '3.3'
        self.assertEqual(self.get_module_list(['foo']), ['baz', 'bar', 'foo'])
        self.moduleset.modules['syspkgbravo'].branch.version = '3.4'
        self.assertEqual(self.get_module_list(['foo']), ['baz', 'bar', 'foo'])
        self.moduleset.modules['syspkgbravo'].branch.version = '3.5'
        self.assertEqual(self.get_module_list(['foo']),
                         ['baz', 'syspkgbravo', 'bar', 'foo'])
        self.moduleset.modules['syspkgbravo'].branch.version = '4'
        self.assertEqual(self.get_module_list(['foo']),
                         ['baz', 'syspkgbravo', 'bar', 'foo'])
コード例 #2
0
 def setUp(self):
     self.moduleset = jhbuild.moduleset.ModuleSet()
     self.moduleset.add(Package('foo'))
     self.moduleset.add(Package('bar'))
     self.moduleset.add(Package('baz'))
     self.moduleset.add(Package('qux'))
     self.moduleset.add(Package('quux'))
     self.moduleset.add(Package('corge'))
コード例 #3
0
 def setUp(self):
     super(ModuleOrderingTestCase, self).setUp()
     self.moduleset = jhbuild.moduleset.ModuleSet(config=self.config)
     self.moduleset.add(Package('foo'))
     self.moduleset.add(Package('bar'))
     self.moduleset.add(Package('baz'))
     self.moduleset.add(Package('qux'))
     self.moduleset.add(Package('quux'))
     self.moduleset.add(Package('corge'))