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