コード例 #1
0
 def test_rule_007(self):
     oRule = variable.rule_007()
     self.assertTrue(oRule)
     self.assertEqual(oRule.name, 'variable')
     self.assertEqual(oRule.identifier, '007')
     dExpected = [11, 16]
     oRule.analyze(oFile)
     self.assertEqual(oRule.violations, dExpected)
コード例 #2
0
    def test_rule_007(self):
        oRule = variable.rule_007()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'variable')
        self.assertEqual(oRule.identifier, '007')

        lExpected = [19, 24]

        oRule.analyze(self.oFile)
        self.assertEqual(
            lExpected,
            utils.extract_violation_lines_from_violation_object(
                oRule.violations))
コード例 #3
0
 def test_fix_rule_007(self):
     oRule = variable.rule_007()
     self.assertFalse(oRule.fixable)