def test_rule_009(self):
        oRule = generate.rule_009()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'generate')
        self.assertEqual(oRule.identifier, '009')

        dExpected = [{'line_number': 19, 'words_to_fix': {'END'}}]
        oRule.analyze(oFile)
        self.assertEqual(oRule.violations, dExpected)
Example #2
0
    def test_rule_009(self):
        oRule = generate.rule_009()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'generate')
        self.assertEqual(oRule.identifier, '009')

        dExpected = [19]
        oRule.analyze(oFile)
        self.assertEqual(oRule.violations, dExpected)
Example #3
0
 def test_fix_rule_009(self):
     oRule = generate.rule_009()
     oRule.fix(self.oFile)
     oRule.analyze(self.oFile)
     self.assertEqual(oRule.violations, [])
     self.assertEqual(self.oFile.lines[19].line, 'end GENERATE generate_1;')