Ejemplo n.º 1
0
 def test_fix_rule_002(self):
     oRule = attribute.rule_002()
     dExpected = []
     oRule.fix(oFile)
     oRule.analyze(oFile)
     self.assertEqual(oRule.violations, dExpected)
     self.assertEqual(oFile.lines[9].line, '  attribute ram_init_file : string;')
    def test_rule_002(self):
        oRule = attribute.rule_002()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'attribute')
        self.assertEqual(oRule.identifier, '002')

        dExpected = [{'line_number': 9, 'words_to_fix': {'ATTRIBUTE'}}]
        oRule.analyze(oFile)
        self.assertEqual(oRule.violations, dExpected)
Ejemplo n.º 3
0
    def test_rule_002(self):
        oRule = attribute.rule_002()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'attribute')
        self.assertEqual(oRule.identifier, '002')

        dExpected = [9]
        oRule.analyze(oFile)
        self.assertEqual(oRule.violations, dExpected)
Ejemplo n.º 4
0
 def test_rule_002(self):
     oRule = attribute.rule_002()
     self.assertTrue(oRule)
     self.assertEqual(oRule.name, 'attribute')
     self.assertEqual(oRule.identifier, '002')
     self.assertTrue(oRule.depricated)