def test_with_config_file_parent_top_dir(self): self.write_config_yaml_file() os.chdir("tests") with self.assertRaises(SystemExit): run_gaplint(files=["test1.g"], silent=True) os.chdir("..") self.rm_config_yaml_file()
def test_with_config_file_parent_root(self): os.rename(".git", ".tmp_git") try: with self.assertRaises(SystemExit): run_gaplint(files=["test1.g"], silent=True) except Exception: pass os.rename(".tmp_git", ".git")
def test_run_gaplint(self): with self.assertRaises(SystemExit): run_gaplint() with self.assertRaises(SystemExit): run_gaplint(files=["tests/test1.g"], max_warnings=0) run_gaplint(files=["non-existant-file"]) with self.assertRaises(SystemExit): run_gaplint(files=["tests/test1.g"], verbose=True)
def test_autodoc_whitespace(self): with self.assertRaises(SystemExit): run_gaplint(files=["tests/test5.g"])
def test_wrong_ext(self): run_gaplint(files=["tests/file.wrongext"], silent=True)
def test_dot_tst_file(self): with self.assertRaises(SystemExit): run_gaplint(files=["tests/test.tst"], silent=True)
def test_dot_g_file4(self): with self.assertRaises(SystemExit): run_gaplint(files=["tests/test1.g"], silent=True, disable="all")
def test_dot_g_file3(self): with self.assertRaises(SystemExit): run_gaplint(files=["tests/test3.g"], silent=True)
def test_empty_yaml(self): self.write_config_yaml_file(EMPTY_YAML_FILE) with self.assertRaises(SystemExit): run_gaplint(files=["tests/test4.g"], silent=True) self.rm_config_yaml_file()
def test_disable_all_file_suppressions(self): with self.assertRaises(SystemExit): run_gaplint(files=["tests/test4.g"], silent=True)
def test_with_bad_config_file_3(self): self.write_config_yaml_file(BAD_CONFIG_YAML_FILE_3) with self.assertRaises(SystemExit): run_gaplint(files=["tests/test1.g"], silent=True) self.rm_config_yaml_file()
def test_with_config_file_root_dir(self): self.write_config_yaml_file() with self.assertRaises(SystemExit): run_gaplint(files=["tests/test1.g"], silent=True) self.rm_config_yaml_file()