コード例 #1
0
 def test_fix_rule_003(self):
     oRule = attribute.rule_003()
     dExpected = []
     oRule.fix(oFile)
     oRule.analyze(oFile)
     self.assertEqual(oRule.violations, dExpected)
     self.assertEqual(oFile.lines[11].line, '  attribute ram_init_file of ram_block :')
コード例 #2
0
    def test_rule_003(self):
        oRule = attribute.rule_003()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'attribute')
        self.assertEqual(oRule.identifier, '003')

        dExpected = [utils.add_violation(11)]
        oRule.analyze(oFile)
        self.assertEqual(oRule.violations, dExpected)