diff --git a/CHANGELOG.md b/CHANGELOG.md index 27e33cf..4a2b6e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Hermes Web UI -- Changelog +## [v0.50.60] — 2026-04-16 + +### Changed +- **Test robustness** — two onboarding setup tests (`test_setup_allowed_with_confirm_overwrite`, `test_setup_allowed_when_no_config_exists`) now skip gracefully when PyYAML is not installed in the test environment, matching the pattern already used in `test_onboarding_mvp.py`. No production code changed. (PR #564) + ## [v0.50.59] — 2026-04-16 ### Fixed diff --git a/static/index.html b/static/index.html index 9a1f7aa..6d02137 100644 --- a/static/index.html +++ b/static/index.html @@ -553,7 +553,7 @@
System
Instance version and access controls.
- v0.50.59 + v0.50.60
diff --git a/tests/test_onboarding_existing_config.py b/tests/test_onboarding_existing_config.py index e644b66..952bcee 100644 --- a/tests/test_onboarding_existing_config.py +++ b/tests/test_onboarding_existing_config.py @@ -20,6 +20,14 @@ from unittest import mock import pytest +# Skip tests that call apply_onboarding_setup → _save_yaml_config when PyYAML is missing +try: + import yaml as _yaml + _HAS_YAML = True +except ImportError: + _HAS_YAML = False +_needs_yaml = pytest.mark.skipif(not _HAS_YAML, reason="PyYAML not installed — onboarding setup tests require it") + # --------------------------------------------------------------------------- # Unit tests — no live server needed, test logic directly via imports # --------------------------------------------------------------------------- @@ -139,6 +147,7 @@ class TestApplyOnboardingSetupGuard: ) assert result.get("requires_confirm") is True + @_needs_yaml def test_setup_allowed_with_confirm_overwrite(self): """With confirm_overwrite=True, setup may proceed (will hit real logic).""" import api.onboarding as mod @@ -163,6 +172,7 @@ class TestApplyOnboardingSetupGuard: finally: fake_config_path.unlink(missing_ok=True) + @_needs_yaml def test_setup_allowed_when_no_config_exists(self): """Fresh install: no config.yaml → setup proceeds normally (no blocking error).""" import api.onboarding as mod @@ -232,17 +242,6 @@ requires_server = pytest.mark.skipif( ) -try: - import yaml as _yaml - _HAS_YAML = True -except ImportError: - _HAS_YAML = False - -_needs_yaml = pytest.mark.skipif( - not _HAS_YAML, reason="PyYAML not installed" -) - - @requires_server class TestOnboardingGateIntegration: """Live-server integration tests for the onboarding gate fix."""