fix(hopx): improve health_check robustness and add test coverage #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a bug in the
health_check()method and adds comprehensive test coverage for the Hopx provider introduced in PR #9.Changes
🐛 Bug Fixes
health_check robustness (
sandboxes/providers/hopx.py:548)Nonereturn fromHopxSandbox.list()API'NoneType' object is not iterableNonebefore returningTrue✅ Testing Improvements
pytest marker registration (
tests/conftest.py:138)pytest.mark.hopxmarker registrationPytestUnknownMarkWarning4 new comprehensive test cases (
tests/test_hopx_provider.py:712-870):test_hopx_timeout_parameter_compatibility- Verify timeout parameters passed correctly to SDKtest_hopx_concurrent_command_execution- Test concurrent command executiontest_hopx_environment_variables_in_commands- Verify env vars properly passedtest_hopx_health_check_handles_none_response- Test health_check edge casesTest Results
✅ All 26 unit tests pass (previously 22)
✅ Real API testing confirms fixes work
Truecorrectlyrun_code()functionality verified with real sandboxImpact
Related
This PR builds on the excellent work in PR #9 by adding additional safety checks and test coverage.