mcp-forge/src/mcp_forge/execution/jupyter
Hans Aschauer 7c9721dfcc Fix error handling and update tests for Jupyter backend
Error Handling:
- Track has_error flag in execute_code to detect error messages
- Return success=False when error message received
- Populate error field with stderr content on errors
- Set exit_code=1 on errors

Test Improvements:
- Add comprehensive mocking for ZMQ/Jupyter components
- Mock _allocate_ports, _wait_for_kernel_ready, _connect_client
- Mock BlockingKernelClient with proper message responses
- Mock tempfile and Path operations
- Fix test expectations for mocked environment
- Simplify error tests (can't test actual errors with mocks)
- Fix shutdown_kernel test (no timeout parameter)
- All 22 tests now passing!

Test Results: 22 passed, 0 failed
2026-02-07 08:20:20 +01:00
..
__init__.py initial commit after one day coding agent session 2026-02-07 07:45:57 +01:00
backend.py Add MCP injection support to Jupyter backend 2026-02-07 08:13:40 +01:00
kernel.py Fix error handling and update tests for Jupyter backend 2026-02-07 08:20:20 +01:00
kernel_old.py Implement real Jupyter backend with jupyter-client 2026-02-07 08:06:44 +01:00
sessions.py Add MCP injection support to Jupyter backend 2026-02-07 08:13:40 +01:00