Yicong-Huang opened a new pull request, #4520:
URL: https://github.com/apache/texera/pull/4520

   ### What changes were proposed in this PR?
   
   Adds unit tests for the two debugger-adjacent worker RPC handlers that had 
no Python coverage:
   
   - **`test_evaluate_expression_handler.py`** (4 cases) — covers 
`EvaluateExpressionHandler.evaluate_python_expression`, which backs the 
frontend's "watch variable" feature. Verifies the evaluator's return is passed 
through unchanged, the runtime context exposes the executor as `self` / current 
tuple as `tuple_` / current port id as `input_`, the context is read fresh on 
each call (not snapshot at handler construction), and the handler tolerates 
`None` tuple/port (worker before any input has arrived).
   - **`test_replay_current_tuple_handler.py`** (6 cases) — covers 
`RetryCurrentTupleHandler.retry_current_tuple` (used by debugger "step over an 
exception" flows). Verifies it chains the current tuple onto the front of the 
input iterator, resumes `USER_PAUSE` + `EXCEPTION_PAUSE` in order, **does not** 
resume `DEBUG_PAUSE` (so an active debugging session is not silently dropped), 
no-ops when the worker is `COMPLETED`, and still chains correctly when the 
remaining iterator is empty.
   
   No production code is touched. Async handlers are driven via `asyncio.run` 
to avoid pulling in `pytest-asyncio`, matching the pattern from #4510 / #4512.
   
   ### Any related issues, documentation, discussions?
   
   Closes #4516. Same gap pattern as #4509.
   
   ### How was this PR tested?
   
   ```
   $ python -m pytest 
core/architecture/handlers/control/test_evaluate_expression_handler.py \
                      
core/architecture/handlers/control/test_replay_current_tuple_handler.py -v
   ======================== 10 passed in 1.14s ========================
   ```
   
   `ruff format --check .` and `ruff check .` clean locally.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.7)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to