Skip to content

Commit b09eba1

Browse files
committed
Update cli init tests to pass all available templates.
1 parent b709f03 commit b09eba1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test_cli_init.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from pathlib import Path
55
import shutil
66
from cli_test_utils import run_cli
7+
from agentstack.proj_templates import get_all_templates
78

89
BASE_PATH = Path(__file__).parent
910

@@ -19,8 +20,9 @@ def setUp(self):
1920
def tearDown(self):
2021
shutil.rmtree(self.project_dir, ignore_errors=True)
2122

22-
def test_init_command(self):
23+
@parameterized.expand([(template.name, ) for template in get_all_templates()])
24+
def test_init_command(self, template_name: str):
2325
"""Test the 'init' command to create a project directory."""
24-
result = run_cli('init', 'test_project')
26+
result = run_cli('init', 'test_project', '--template', template_name)
2527
self.assertEqual(result.returncode, 0)
2628
self.assertTrue((self.project_dir / 'test_project').exists())

0 commit comments

Comments
 (0)