Ejemplo n.º 1
0
 def test_add(self):
     """Test if the `add` subcommand can add projects to the config file."""
     try:
         cmd = ['semantic', 'add', 'dummy_added_project', '/tmp/dummy.yaml']
         subprocess.check_call(cmd, env=self.testenv)
         projects = pr.get_projects()
         self.assertIn(("dummy_added_project", "/tmp/dummy.yaml"), projects)
     finally:
         pr.remove_project("dummy_added_project")
Ejemplo n.º 2
0
 def test_add(self):
     """Test if the `add` subcommand can add projects to the config file."""
     try:
         cmd = ['semantic', 'add', 'dummy_added_project', '/tmp/dummy.yaml']
         subprocess.check_call(cmd, env=self.testenv)
         projects = pr.get_projects()
         self.assertIn(("dummy_added_project", "/tmp/dummy.yaml"), projects)
     finally:
         pr.remove_project("dummy_added_project")
Ejemplo n.º 3
0
 def test_remove(self):
     """Test if the remove subcommand can remove projects."""
     pr.add_project("dummy_project_2", "/foo/baz.yaml")
     try:
         cmd = ['semantic', 'remove', 'dummy_project_2']
         subprocess.check_call(cmd, env=self.testenv)
         projects = pr.get_projects()
         proj_names = [p[0] for p in projects]
         self.assertNotIn("dummy_project_2", proj_names)
     finally:
         pr.remove_project("dummy_project_2")
Ejemplo n.º 4
0
 def test_remove(self):
     """Test if the remove subcommand can remove projects."""
     pr.add_project("dummy_project_2", "/foo/baz.yaml")
     try:
         cmd = ['semantic', 'remove', 'dummy_project_2']
         subprocess.check_call(cmd, env=self.testenv)
         projects = pr.get_projects()
         proj_names = [p[0] for p in projects]
         self.assertNotIn("dummy_project_2", proj_names)
     finally:
         pr.remove_project("dummy_project_2")