def test_process_files_with_config(self): config = {'config': 'tests/fixtures/luacheck/luacheckrc'} tool = Luacheck(self.problems, config) tool.process_files(self.fixtures) problems = self.problems.all(self.fixtures[2]) eq_(1, len(problems), 'Config file should lower error count.')
def test_process_files_with_missing_config(self): config = {'config': 'not_a_file'} tool = Luacheck(self.problems, config, root_dir) tool.process_files(self.fixtures) problems = self.problems.all() self.assertEqual(1, len(problems), "Couldn't load configuration from") self.assertIn("Couldn't", problems[0].body) self.assertIn("configuration", problems[0].body) self.assertIn("not_a_file", problems[0].body)
def setUp(self): self.problems = Problems() self.tool = Luacheck(self.problems, {}, root_dir)
def setUp(self): self.problems = Problems() self.tool = Luacheck(self.problems)