Skip to content

[split] Refactor / cleanup — from #21#41

Closed
pull-apart[bot] wants to merge 1 commit into
mainfrom
split-pr-21-1783491041-refactor
Closed

[split] Refactor / cleanup — from #21#41
pull-apart[bot] wants to merge 1 commit into
mainfrom
split-pr-21-1783491041-refactor

Conversation

@pull-apart

@pull-apart pull-apart Bot commented Jul 8, 2026

Copy link
Copy Markdown

Automated split from #21.

Context

This is the refactor / cleanup half of an automated split from #21.

Changes in this PR:

  • utilities/unittests/test_console.py: Added import: pytest
  • Added helper function _single_attempt_sampler for testing
  • Updated test_console_disconnect_terminated_child to mock _proc.poll() and call console_eof_sampler() without arguments
  • Updated test_console_eof_sampler_success to assert _spawn_console as func and remove command/timeout checks
  • Updated test_console_eof_sampler_no_sample to call console_eof_sampler() without arguments
  • Added new test test_spawn_console_success for _spawn_console method
  • Added new test test_spawn_console_popen_failure for _spawn_console error handling during Popen call
  • Added new test test_spawn_console_fdspawn_failure for _spawn_console error handling during fdspawn call
  • Added new test test_terminate_proc_success for _terminate_proc method
  • Added new test test_terminate_proc_already_exited for _terminate_proc when process already exited
  • Added new test test_terminate_proc_timeout_then_kill for _terminate_proc when process times out
  • Added new test test_connect_success_with_reconnect for connect using the new _spawn_console
  • Added new test test_connect_failure_with_cleanup for connect error path and _terminate_proc cleanup
  • Added new test test_disconnect_success_with_reconnect for disconnect with explicit reconnect
How this split maps your changes
  • Refactor branch (split-pr-21-1783491041-refactor): files classified as cleanup / mechanical work:
    • utilities/unittests/test_console.py
  • Main branch (split-pr-21-1783491041-main): files classified as feature / behavior work:
    • utilities/console.py

Merge order

Merge the refactor PR first if it touches shared files or would conflict with the main PR; then merge the main PR. Resolve conflicts in the usual way if both branches touch the same lines.

Main PR: #42

This was referenced Jul 8, 2026
@RoniKishner RoniKishner closed this Jul 8, 2026
@RoniKishner RoniKishner deleted the split-pr-21-1783491041-refactor branch July 8, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant