Esempio n. 1
0
 def test_should_filter_the_warnings(self):
     option = Mock(thresholds={'cyclomatic_complexity':15, 'length':1000})
     warnings = list(warning_filter(option, [self.fileStat]))
     self.assertEqual(1, len(warnings))
     self.assertEqual("complex", warnings[0].name)
Esempio n. 2
0
 def test_should_filter_the_warnings(self):
     option = Mock(CCN=15, arguments=10)
     warnings = list(warning_filter(option, [self.fileStat]))
     self.assertEqual(1, len(warnings))
     self.assertEqual("complex", warnings[0][0].name)
Esempio n. 3
0
 def test_should_filter_the_warnings(self):
     option = Mock(thresholds={'cyclomatic_complexity': 15, 'length': 1000})
     warnings = list(warning_filter(option, [self.fileStat]))
     self.assertEqual(1, len(warnings))
     self.assertEqual("complex", warnings[0].name)
Esempio n. 4
0
 def test_should_filter_the_warnings(self):
     option = Mock(CCN=15, arguments=10)
     warnings = list(warning_filter(option, [self.fileStat]))
     self.assertEqual(1, len(warnings))
     self.assertEqual("complex", warnings[0][0].name)