def test_bad(self): expected = [(17, "Function Naming Error (FunctionBad contains uppercase)"), (20, "Function Naming Error (functionStuff contains uppercase)")] lines = simpatico.get_lines('tests/files/bad_naming.c') errors = simpatico.check_function_lengths_names(lines) self.assertItemsEqual(errors, expected)
def test_good(self): lines = simpatico.get_lines('tests/files/good_naming.c') errors = simpatico.check_function_lengths_names(lines) self.assertEqual(errors, [])