Skip to content

Commit aee73ee

Browse files
committed
update tests: skip fish shell test on Windows in test_env_coverage
- Add platform check to bypass fish shell test when running on Windows. - Ensure cross-platform compatibility by conditionally executing shell-specific assertions.
1 parent 5c4187e commit aee73ee

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

tests/android/installer/test_env_coverage.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,16 @@ def test_export_to_stdout_formats(self, tmp_path):
5757
else:
5858
assert any("export ANDROID_HOME" in call for call in calls)
5959

60-
# Test fish format
61-
with patch.dict(os.environ, {"SHELL": "/usr/bin/fish"}):
62-
with patch("builtins.print") as mock_print:
63-
exporter.export(
64-
print_stdout=True,
65-
sdk_root=sdk_root,
66-
)
67-
calls = [str(call) for call in mock_print.call_args_list]
68-
assert any("set -x ANDROID_HOME" in call for call in calls)
60+
# Test fish format (skip on Windows)
61+
if platform.system() != "Windows":
62+
with patch.dict(os.environ, {"SHELL": "/usr/bin/fish"}):
63+
with patch("builtins.print") as mock_print:
64+
exporter.export(
65+
print_stdout=True,
66+
sdk_root=sdk_root,
67+
)
68+
calls = [str(call) for call in mock_print.call_args_list]
69+
assert any("set -x ANDROID_HOME" in call for call in calls)
6970

7071
# Test Windows format
7172
with patch("sys.platform", "win32"):

0 commit comments

Comments
 (0)