Ejemplo n.º 1
0
 def test_fix_rule_027(self):
     oRule = if_statement.rule_027()
     dExpected = []
     oRule.fix(oFile)
     oRule.analyze(oFile)
     self.assertEqual(oRule.violations, dExpected)
     self.assertEqual(oFile.lines[86].line, '    else')
Ejemplo n.º 2
0
 def test_rule_027(self):
     oRule = if_statement.rule_027()
     self.assertTrue(oRule)
     self.assertEqual(oRule.name, 'if')
     self.assertEqual(oRule.identifier, '027')
     dExpected = [94]
     oRule.analyze(oFile)
     self.assertEqual(oRule.violations, dExpected)
Ejemplo n.º 3
0
 def test_rule_027(self):
     oRule = if_statement.rule_027()
     self.assertTrue(oRule)
     self.assertEqual(oRule.name, 'if')
     self.assertEqual(oRule.identifier, '027')
     dExpected = [{'lines': [{'number': 94}], 'words_to_fix': {'ELSE'}}]
     oRule.analyze(oFile)
     self.assertEqual(oRule.violations, dExpected)