Ejemplo n.º 1
0
    def testArchAll(self):
        pl = PackageList(source_all)

        self.assertTrue(pl.has_arch_indep_packages())
        self.assertFalse(pl.has_arch_dep_packages())

        suite_amd64 = FakeSuite('amd64')
        p_amd64 = pl.packages_for_suite(suite_amd64)
        self.assertEqual(len(p_amd64), 0)

        suite_all = FakeSuite('all')
        p_all = pl.packages_for_suite(suite_all)
        self.assertEqual(len(p_all), 1)

        suite_all_amd64 = FakeSuite('amd64', 'all')
        p_all_amd64 = pl.packages_for_suite(suite_all_amd64)
        self.assertEqual(len(p_all_amd64), 1)

        p = p_all[0]
        self.assertEqual(p.name, 'libdune-common-doc')
        self.assertEqual(p.type, 'deb')
        self.assertEqual(p.section, 'doc')
        self.assertEqual(p.component, 'main')
        self.assertEqual(p.priority, 'optional')
        self.assertEqual(p.architectures, ['all'])
Ejemplo n.º 2
0
    def testArchAll(self):
        pl = PackageList(source_all)

        self.assertTrue(pl.has_arch_indep_packages())
        self.assertFalse(pl.has_arch_dep_packages())

        suite_amd64 = FakeSuite('amd64')
        p_amd64 = pl.packages_for_suite(suite_amd64)
        self.assertEqual(len(p_amd64), 0)

        suite_all = FakeSuite('all')
        p_all = pl.packages_for_suite(suite_all)
        self.assertEqual(len(p_all), 1)

        suite_all_amd64 = FakeSuite('amd64', 'all')
        p_all_amd64 = pl.packages_for_suite(suite_all_amd64)
        self.assertEqual(len(p_all_amd64), 1)

        p = p_all[0]
        self.assertEqual(p.name, 'libdune-common-doc')
        self.assertEqual(p.type, 'deb')
        self.assertEqual(p.section, 'doc')
        self.assertEqual(p.component, 'main')
        self.assertEqual(p.priority, 'optional')
        self.assertEqual(p.architectures, ['all'])
Ejemplo n.º 3
0
    def testFallback(self):
        pl = PackageList(source_fallback)

        self.assertIsNone(pl.has_arch_indep_packages())
        self.assertIsNone(pl.has_arch_dep_packages())

        suite_amd64 = FakeSuite('amd64')
        p_amd64 = pl.packages_for_suite(suite_amd64)
        self.assertEqual(len(p_amd64), 1)
Ejemplo n.º 4
0
    def testFallback(self):
        pl = PackageList(source_fallback)

        self.assertIsNone(pl.has_arch_indep_packages())
        self.assertIsNone(pl.has_arch_dep_packages())

        suite_amd64 = FakeSuite('amd64')
        p_amd64 = pl.packages_for_suite(suite_amd64)
        self.assertEqual(len(p_amd64), 1)
Ejemplo n.º 5
0
    def testArchAmd64(self):
        pl = PackageList(source_amd64)

        self.assertFalse(pl.has_arch_indep_packages())
        self.assertTrue(pl.has_arch_dep_packages())

        suite_amd64 = FakeSuite('amd64')
        p_amd64 = pl.packages_for_suite(suite_amd64)
        self.assertEqual(len(p_amd64), 1)

        suite_i386 = FakeSuite('i386')
        p_i386 = pl.packages_for_suite(suite_i386)
        self.assertEqual(len(p_i386), 0)
Ejemplo n.º 6
0
    def testArchAmd64(self):
        pl = PackageList(source_amd64)

        self.assertFalse(pl.has_arch_indep_packages())
        self.assertTrue(pl.has_arch_dep_packages())

        suite_amd64 = FakeSuite('amd64')
        p_amd64 = pl.packages_for_suite(suite_amd64)
        self.assertEqual(len(p_amd64), 1)

        suite_i386 = FakeSuite('i386')
        p_i386 = pl.packages_for_suite(suite_i386)
        self.assertEqual(len(p_i386), 0)
Ejemplo n.º 7
0
    def testArchAny(self):
        pl = PackageList(source_any)

        self.assertFalse(pl.has_arch_indep_packages())
        self.assertTrue(pl.has_arch_dep_packages())

        suite_amd64 = FakeSuite('amd64')
        p_amd64 = pl.packages_for_suite(suite_amd64)
        self.assertEqual(len(p_amd64), 1)

        suite_all = FakeSuite('all')
        p_all = pl.packages_for_suite(suite_all)
        self.assertEqual(len(p_all), 0)

        suite_all_amd64 = FakeSuite('amd64', 'all')
        p_all_amd64 = pl.packages_for_suite(suite_all_amd64)
        self.assertEqual(len(p_all_amd64), 1)
Ejemplo n.º 8
0
    def testArchAny(self):
        pl = PackageList(source_any)

        self.assertFalse(pl.has_arch_indep_packages())
        self.assertTrue(pl.has_arch_dep_packages())

        suite_amd64 = FakeSuite('amd64')
        p_amd64 = pl.packages_for_suite(suite_amd64)
        self.assertEqual(len(p_amd64), 1)

        suite_all = FakeSuite('all')
        p_all = pl.packages_for_suite(suite_all)
        self.assertEqual(len(p_all), 0)

        suite_all_amd64 = FakeSuite('amd64', 'all')
        p_all_amd64 = pl.packages_for_suite(suite_all_amd64)
        self.assertEqual(len(p_all_amd64), 1)
Ejemplo n.º 9
0
    def testArchLinuxAny(self):
        pl = PackageList(source_linuxany)

        self.assertFalse(pl.has_arch_indep_packages())
        self.assertTrue(pl.has_arch_dep_packages())

        suite_amd64 = FakeSuite('amd64')
        p_amd64 = pl.packages_for_suite(suite_amd64)
        self.assertEqual(len(p_amd64), 1)

        suite_i386 = FakeSuite('i386')
        p_i386 = pl.packages_for_suite(suite_i386)
        self.assertEqual(len(p_i386), 1)

        suite_kfreebsdi386 = FakeSuite('kfreebsd-i386')
        p_kfreebsdi386 = pl.packages_for_suite(suite_kfreebsdi386)
        self.assertEqual(len(p_kfreebsdi386), 0)

        suite_source = FakeSuite('source')
        p_source = pl.packages_for_suite(suite_source)
        self.assertEqual(len(p_source), 0)
Ejemplo n.º 10
0
    def testArchLinuxAny(self):
        pl = PackageList(source_linuxany)

        self.assertFalse(pl.has_arch_indep_packages())
        self.assertTrue(pl.has_arch_dep_packages())

        suite_amd64 = FakeSuite('amd64')
        p_amd64 = pl.packages_for_suite(suite_amd64)
        self.assertEqual(len(p_amd64), 1)

        suite_i386 = FakeSuite('i386')
        p_i386 = pl.packages_for_suite(suite_i386)
        self.assertEqual(len(p_i386), 1)

        suite_kfreebsdi386 = FakeSuite('kfreebsd-i386')
        p_kfreebsdi386 = pl.packages_for_suite(suite_kfreebsdi386)
        self.assertEqual(len(p_kfreebsdi386), 0)

        suite_source = FakeSuite('source')
        p_source = pl.packages_for_suite(suite_source)
        self.assertEqual(len(p_source), 0)