diff --git a/tests/portability/test_pyinstaller_binary.py b/tests/portability/test_pyinstaller_binary.py index 71d2b2e4..42bb4ed8 100644 --- a/tests/portability/test_pyinstaller_binary.py +++ b/tests/portability/test_pyinstaller_binary.py @@ -23,13 +23,19 @@ def command_str_to_list(command: str) -> list[str]: (command_str_to_list("algokit doctor"), [0]), (command_str_to_list("algokit task vanity-address PY"), [0]), (command_str_to_list("algokit -v init --name playground -t python --no-git --no-ide"), [0]), - (command_str_to_list("cd playground && algokit project run build -- hello_world"), [0]), + (command_str_to_list("algokit project run build -- hello_world"), [0]), ], ) def test_non_interactive_algokit_commands( command: list[str], exit_codes: list[int], tmp_path_factory: pytest.TempPathFactory ) -> None: cwd = tmp_path_factory.mktemp("cwd") + + # Create a 'playground' directory + if "build" in command: + cwd = cwd / "playground" + cwd.mkdir(exist_ok=True) + execution_result = subprocess.run(command, capture_output=True, text=True, check=False, cwd=cwd) logger.info(f"Command {command} returned {execution_result.stdout}")