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 :')
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)