Beispiel #1
0
 def slocCountsMatchReferenceDb(self):
     slocs_jessie = {
         'ansic': 166724,
         'asm': 65,
         'awk': 25,
         'cpp': 41458,
         'cs': 1213,
         'java': 916,
         'lex': 223,
         'lisp': 2193,
         'makefile': 2092,
         'ml': 5044,
         'objc': 836,
         'perl': 1199,
         'python': 2916,
         'ruby': 193,
         'sed': 16,
         'sh': 29984,
         'sql': 237,
         'xml': 14932,
         'yacc': 312,
     }
     slocs_python = 8740
     slocs_cpp_exp = 87521
     self.assertEqual(slocs_jessie,
                      statistics.sloccount_summary(self.session,
                                                   suite='jessie'))
     self.assertEqual(slocs_python,
                      statistics.sloccount_lang(self.session, 'python'))
     self.assertEqual(slocs_cpp_exp,
                      statistics.sloccount_lang(self.session, 'cpp',
                                                suite='experimental'))
Beispiel #2
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))
Beispiel #3
0
 def slocCountsMatchReferenceDb(self):
     slocs_jessie = {
         'ansic': 166724,
         'asm': 65,
         'awk': 25,
         'cpp': 41458,
         'cs': 1213,
         'java': 916,
         'lex': 223,
         'lisp': 2193,
         'makefile': 2092,
         'ml': 5044,
         'objc': 836,
         'perl': 1199,
         'python': 2916,
         'ruby': 193,
         'sed': 16,
         'sh': 29984,
         'sql': 237,
         'xml': 14932,
         'yacc': 312,
     }
     slocs_python = 9193
     slocs_cpp_exp = 87521
     self.assertEqual(
         slocs_jessie,
         statistics.sloccount_summary(self.session, suite='jessie'))
     self.assertEqual(slocs_python,
                      statistics.sloccount_lang(self.session, 'python'))
     self.assertEqual(
         slocs_cpp_exp,
         statistics.sloccount_lang(self.session,
                                   'cpp',
                                   suite='experimental'))
Beispiel #4
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))
Beispiel #5
0
 def slocCountsMatchReferenceDb(self):
     slocs_jessie = {
         "ansic": 166724,
         "asm": 65,
         "awk": 25,
         "cpp": 41458,
         "cs": 1213,
         "java": 916,
         "lex": 223,
         "lisp": 2193,
         "makefile": 2104,
         "ml": 5044,
         "objc": 836,
         "perl": 1199,
         "python": 2916,
         "ruby": 193,
         "sed": 16,
         "sh": 30045,
         "sql": 237,
         "xml": 14932,
         "yacc": 312,
     }
     slocs_python = 9193
     slocs_cpp_exp = 87521
     self.assertEqual(
         slocs_jessie,
         statistics.sloccount_summary(self.session, suite="jessie"))
     self.assertEqual(slocs_python,
                      statistics.sloccount_lang(self.session, "python"))
     self.assertEqual(
         slocs_cpp_exp,
         statistics.sloccount_lang(self.session,
                                   "cpp",
                                   suite="experimental"),
     )
Beispiel #6
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))