Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MHendricks committed Jan 13, 2024
1 parent 9f83c5d commit ddb3605
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<module 'sys' (built-in)>\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:
Expand All @@ -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),
]
Expand All @@ -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,
Expand Down

0 comments on commit ddb3605

Please sign in to comment.