예제 #1
0
 def test_print_and_save_detail_information(self):
     fileSummary = FileInformation("FILENAME")
     fileSummary.summarize(123)
     print_and_save_detail_information([fileSummary],
                                       Mock(warnings_only=False))
     self.assertIn("    123      0      0         0         0     FILENAME",
                   sys.stdout.stream)
예제 #2
0
파일: testOutput.py 프로젝트: uniwolf/hfcca
 def test_print_and_save_detail_information(self):
     fileSummary = FileInformation("FILENAME")
     fileSummary.summarize(123)
     print_and_save_detail_information([fileSummary], Mock(warnings_only=False))
     self.assertIn("    123      0      0         0         0     FILENAME", sys.stdout.stream)
     
     
예제 #3
0
파일: testOutput.py 프로젝트: uniwolf/hfcca
 def test_should_use_clang_format_for_warning(self):
     fun = FunctionInfo("foo", 100)
     fun.cyclomatic_complexity = 16
     fileStat = FileInformation("FILENAME")
     fileStat.append(fun)
     option = Mock(CCN=15)
     print_warnings(option, [fileStat])
     self.assertIn("FILENAME:100: warning: foo has 16 CCN and 0 params (0 NLOC, 0 tokens)\n", sys.stdout.stream)
예제 #4
0
 def test_should_use_clang_format_for_warning(self):
     fun = FunctionInfo("foo", 100)
     fun.cyclomatic_complexity = 16
     fileStat = FileInformation("FILENAME")
     fileStat.append(fun)
     option = Mock(CCN=15)
     print_warnings(option, [fileStat])
     self.assertIn(
         "FILENAME:100: warning: foo has 16 CCN and 0 params (0 NLOC, 0 tokens)\n",
         sys.stdout.stream)