def test_rule_013(self): oRule = instantiation.rule_013() self.assertTrue(oRule) self.assertEqual(oRule.name, 'instantiation') self.assertEqual(oRule.identifier, '013') dExpected = [22,33] oRule.analyze(oFileGeneric) self.assertEqual(oRule.violations, dExpected)
def test_rule_013(self): oRule = instantiation.rule_013() self.assertTrue(oRule) self.assertEqual(oRule.name, 'instantiation') self.assertEqual(oRule.identifier, '013') dExpected = [{ 'line_number': 22, 'words_to_fix': {'genEric'} }, { 'line_number': 33, 'words_to_fix': {'mAP'} }] oRule.analyze(oFileGeneric) self.assertEqual(oRule.violations, dExpected)
def test_fix_rule_013(self): oRule = instantiation.rule_013() oRule.fix(self.oFileGeneric) oRule.analyze(self.oFileGeneric) self.assertEqual(oRule.violations, [])
def test_rule_013(self): oRule = instantiation.rule_013() self.assertTrue(oRule) self.assertEqual(oRule.name, 'instantiation') self.assertEqual(oRule.identifier, '013') self.assertTrue(oRule.depricated)