Esempio n. 1
0
 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()
Esempio n. 2
0
 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")
Esempio n. 3
0
 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)
Esempio n. 4
0
 def test_autodoc_whitespace(self):
     with self.assertRaises(SystemExit):
         run_gaplint(files=["tests/test5.g"])
Esempio n. 5
0
 def test_wrong_ext(self):
     run_gaplint(files=["tests/file.wrongext"], silent=True)
Esempio n. 6
0
 def test_dot_tst_file(self):
     with self.assertRaises(SystemExit):
         run_gaplint(files=["tests/test.tst"], silent=True)
Esempio n. 7
0
 def test_dot_g_file4(self):
     with self.assertRaises(SystemExit):
         run_gaplint(files=["tests/test1.g"], silent=True, disable="all")
Esempio n. 8
0
 def test_dot_g_file3(self):
     with self.assertRaises(SystemExit):
         run_gaplint(files=["tests/test3.g"], silent=True)
Esempio n. 9
0
 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()
Esempio n. 10
0
 def test_disable_all_file_suppressions(self):
     with self.assertRaises(SystemExit):
         run_gaplint(files=["tests/test4.g"], silent=True)
Esempio n. 11
0
 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()
Esempio n. 12
0
 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()