From ddb360547cf9da89f10d516373fb5bdded31ef2f Mon Sep 17 00:00:00 2001 From: Mike Hendricks Date: Fri, 12 Jan 2024 18:40:29 -0800 Subject: [PATCH] fixes --- tests/test_launch.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_launch.py b/tests/test_launch.py index 44886f3..bd67ead 100644 --- a/tests/test_launch.py +++ b/tests/test_launch.py @@ -209,7 +209,7 @@ class TestCliExitCodes: # but is used to ensure that exit-codes are returned to the calling process. py_cmd = "print('Running...');import sys;print(sys);sys.exit({code})" output_text = "Running...\n\n" - run_kwargs = dict(stdout=subprocess.PIPE, stderr=subprocess.STDOUT, timeout=10) + run_kwargs = dict(stdout=subprocess.PIPE, stderr=subprocess.STDOUT, timeout=30) if sys.version_info.minor >= 7: run_kwargs["text"] = True else: @@ -218,9 +218,10 @@ class TestCliExitCodes: @pytest.mark.skipif(sys.platform != "win32", reason="only applies on windows") @missing_annotations_hack def test_bat(self, config_root, exit_code): + hab_bin = (config_root / ".." / "bin" / "hab.bat").resolve() # fmt: off cmd = [ - "hab.bat", "--site", str(config_root / "site_main.json"), + str(hab_bin), "--site", str(config_root / "site_main.json"), *self.sub_cmd, self.py_cmd.format(code=exit_code), ] @@ -240,7 +241,7 @@ def test_ps1(self, config_root, exit_code): script = (config_root / ".." / "bin" / "hab.ps1").resolve() # fmt: off cmd = [ - "powershell.exe", "-ExecutionPolicy", "Unrestricted", + "powershell.exe", "-ExecutionPolicy", "Unrestricted", "-NonInteractive", "-File", str(script), "--site", str(config_root / "site_main.json"), *self.sub_cmd,