# Path: tests/utils.py
# def run_temci(args: str, settings: dict = None, files: Dict[str, Union[dict, list, str]] = None,
#               expect_success: bool = True, misc_env: Dict[str, str] = None, raise_exc: bool = False) \
#         -> Result:
#     """
#     Run temci with the passed arguments
# 
#     :param args: arguments for temci
#     :param settings: settings dictionary, stored in a file called `settings.yaml` and appended to the arguments
#     :param files: {file name: content as string or dictionary that is converted into YAML first}
#     :param expect_success: expect a zero return code
#     :param misc_env: additional environment variables
#     :return: result of the call
#     """
#     if os.getenv("TEMCI_TEST_CMD", "0") == "1":
#         return run_temci_proc(args, settings, files, expect_success, misc_env=misc_env)
#     return run_temci_click(args, settings, files, expect_success, misc_env=misc_env, raise_exc=raise_exc)


from tests.utils import run_temci
"""
Tests related to temci's init commands
"""


def test_temci_init_build_config():
    run_temci("build a.yaml", files={
        "a.yaml": run_temci("init build_config").file_contents["build_config.yaml"]
    })


def test_temci_init_run_config():

# Path: tests/utils.py
# def run_temci(args: str, settings: dict = None, files: Dict[str, Union[dict, list, str]] = None,
#               expect_success: bool = True, misc_env: Dict[str, str] = None, raise_exc: bool = False) \
#         -> Result:
#     """
#     Run temci with the passed arguments
# 
#     :param args: arguments for temci
#     :param settings: settings dictionary, stored in a file called `settings.yaml` and appended to the arguments
#     :param files: {file name: content as string or dictionary that is converted into YAML first}
#     :param expect_success: expect a zero return code
#     :param misc_env: additional environment variables
#     :return: result of the call
#     """
#     if os.getenv("TEMCI_TEST_CMD", "0") == "1":
#         return run_temci_proc(args, settings, files, expect_success, misc_env=misc_env)
#     return run_temci_click(args, settings, files, expect_success, misc_env=misc_env, raise_exc=raise_exc)


# Path: tests/test_init.py
from tests.utils import run_temci

"""
Tests related to temci's init commands
"""


def test_temci_init_build_config():
    run_temci("build a.yaml", files={
        "a.yaml": run_temci("init build_config").file_contents["build_config.yaml"]
    })


def test_temci_init_run_config():

    run_temci("exec a.yaml", files={