Example #1
0
    def areaFiltersMatchReferenceDb(self):
        self.assertEqual(statistics.disk_usage(self.session),
                         136572)
        self.assertEqual(statistics.disk_usage(self.session, areas=['main']),
                         111016)
        self.assertEqual(statistics.disk_usage(self.session,
                                               suite='wheezy', areas=['main']),
                         35824)

        area_count = statistics.source_packages(self.session, areas=['main'])
        self.assertEqual(area_count, 14)
        self.assertLessEqual(area_count,
                             statistics.source_packages(self.session))

        area_count = statistics.source_files(self.session, areas=['contrib'])
        self.assertEqual(area_count, 372)
        self.assertLessEqual(area_count, statistics.source_files(self.session))

        area_count = statistics.sloccount_lang(self.session,
                                               'ansic', areas=['non-free'])
        self.assertEqual(area_count, 147526)
        self.assertLessEqual(area_count,
                             statistics.sloccount_lang(self.session, 'ansic'))

        area_count = statistics.ctags(self.session, areas=['main'])
        self.assertEqual(area_count, 55994)
        self.assertLessEqual(area_count, statistics.ctags(self.session))
Example #2
0
    def areaFiltersMatchReferenceDb(self):
        self.assertEqual(statistics.disk_usage(self.session), 180732)
        self.assertEqual(statistics.disk_usage(self.session, areas=['main']),
                         155176)
        self.assertEqual(
            statistics.disk_usage(self.session, suite='wheezy',
                                  areas=['main']), 35824)

        area_count = statistics.source_packages(self.session, areas=['main'])
        self.assertEqual(area_count, 17)
        self.assertLessEqual(area_count,
                             statistics.source_packages(self.session))

        area_count = statistics.source_files(self.session, areas=['contrib'])
        self.assertEqual(area_count, 372)
        self.assertLessEqual(area_count, statistics.source_files(self.session))

        area_count = statistics.sloccount_lang(self.session,
                                               'ansic',
                                               areas=['non-free'])
        self.assertEqual(area_count, 147526)
        self.assertLessEqual(area_count,
                             statistics.sloccount_lang(self.session, 'ansic'))

        area_count = statistics.ctags(self.session, areas=['main'])
        self.assertEqual(area_count, 87507)
        self.assertLessEqual(area_count, statistics.ctags(self.session))
Example #3
0
    def areaFiltersMatchReferenceDb(self):
        self.assertEqual(statistics.disk_usage(self.session), 181628)
        self.assertEqual(statistics.disk_usage(self.session, areas=["main"]),
                         156072)
        self.assertEqual(
            statistics.disk_usage(self.session, suite="wheezy",
                                  areas=["main"]), 35824)

        area_count = statistics.source_packages(self.session, areas=["main"])
        self.assertEqual(area_count, 18)
        self.assertLessEqual(area_count,
                             statistics.source_packages(self.session))

        area_count = statistics.source_files(self.session, areas=["contrib"])
        self.assertEqual(area_count, 372)
        self.assertLessEqual(area_count, statistics.source_files(self.session))

        area_count = statistics.sloccount_lang(self.session,
                                               "ansic",
                                               areas=["non-free"])
        self.assertEqual(area_count, 147526)
        self.assertLessEqual(area_count,
                             statistics.sloccount_lang(self.session, "ansic"))

        area_count = statistics.ctags(self.session, areas=["main"])
        self.assertEqual(area_count, 88251)
        self.assertLessEqual(area_count, statistics.ctags(self.session))
Example #4
0
 def diskUsagesMatchReferenceDb(self):
     sizes = {
         'squeeze': 44316,
         'wheezy': 39688,
         'jessie': 50528,
         'sid': 43032,
         'experimental': 12968,
     }
     total_size = 136572
     self.assertSuiteCountsEqual(sizes, statistics.disk_usage)
     self.assertEqual(total_size, statistics.disk_usage(self.session))
Example #5
0
 def diskUsagesMatchReferenceDb(self):
     sizes = {
         'squeeze': 44316,
         'wheezy': 39688,
         'jessie': 50528,
         'sid': 54456,
         'experimental': 12968,
     }
     total_size = 180732
     self.assertSuiteCountsEqual(sizes, statistics.disk_usage)
     self.assertEqual(total_size, statistics.disk_usage(self.session))
Example #6
0
 def diskUsagesMatchReferenceDb(self):
     sizes = {
         "squeeze": 44316,
         "wheezy": 39688,
         "jessie": 51428,
         "sid": 54456,
         "experimental": 12964,
     }
     total_size = 181628
     self.assertSuiteCountsEqual(sizes, statistics.disk_usage)
     self.assertEqual(total_size, statistics.disk_usage(self.session))