mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-23 10:42:00 +00:00
fix(tests): update cua install tests for cross-platform support
f-trycua's #50855 test file predated the cross-platform PR (#50552) and reintroduced two stale tests asserting Linux is unsupported (test_*_non_macos_*, patching platform.system="Linux" and expecting a no-op/warn). Linux + Windows are supported now, so install proceeds on those platforms. Restore main's cross-platform-correct versions: test_*_on_unsupported_platform_* using FreeBSD as the genuinely unsupported case.
This commit is contained in:
parent
5f1d23cfb2
commit
0f741cef28
1 changed files with 4 additions and 4 deletions
|
|
@ -25,19 +25,19 @@ from unittest.mock import patch
|
|||
|
||||
|
||||
class TestInstallCuaDriverUpgrade:
|
||||
def test_upgrade_on_non_macos_is_silent_noop(self):
|
||||
def test_upgrade_on_unsupported_platform_is_silent_noop(self):
|
||||
from hermes_cli import tools_config
|
||||
|
||||
with patch.object(tools_config, "_print_warning") as warn, \
|
||||
patch("platform.system", return_value="Linux"):
|
||||
patch("platform.system", return_value="FreeBSD"):
|
||||
assert tools_config.install_cua_driver(upgrade=True) is False
|
||||
warn.assert_not_called()
|
||||
|
||||
def test_non_upgrade_on_non_macos_warns(self):
|
||||
def test_non_upgrade_on_unsupported_platform_warns(self):
|
||||
from hermes_cli import tools_config
|
||||
|
||||
with patch.object(tools_config, "_print_warning") as warn, \
|
||||
patch("platform.system", return_value="Linux"):
|
||||
patch("platform.system", return_value="FreeBSD"):
|
||||
assert tools_config.install_cua_driver(upgrade=False) is False
|
||||
warn.assert_called()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue