Skip to content

[split] Main changes — from #21#38

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

[split] Main changes — from #21#38
pull-apart[bot] wants to merge 1 commit into
mainfrom
split-pr-21-1783449463-main

Conversation

@pull-apart

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

Copy link
Copy Markdown

Automated split from #21.

Context

This is the main / behavior half of an automated split from #21.

Changes in this PR:

  • utilities/unittests/test_console.py: Added subprocess, pexpect, pytest imports.
  • Added _single_attempt_sampler helper for mocking TimeoutSampler behavior in tests.
  • Updated test_console_disconnect_terminated_child to mock the new _proc attribute instead of child.terminated.
  • Updated existing console_eof_sampler tests to reflect changes in its signature and internal calls.
  • Added new test cases for _spawn_console covering successful execution, subprocess.Popen failure, fdspawn failure, and cleanup on error.
  • Added new test cases for _terminate_proc covering termination of running processes, already terminated processes, timeout scenarios, and no process.
  • Added test_connect_error_cleanup to verify proper cleanup during connection failures.
  • Added test_disconnect_calls_terminate_proc to ensure process termination during disconnect.
  • Modified existing tests to align with the new internal implementation, such as using shlex.split and adapting mock setups.
How this split maps your changes
  • Refactor branch (split-pr-21-1783449463-refactor): files classified as cleanup / mechanical work:
    • utilities/console.py
  • Main branch (split-pr-21-1783449463-main): files classified as feature / behavior work:
    • utilities/unittests/test_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.

Refactor PR: #37

@RoniKishner RoniKishner closed this Jul 7, 2026
@RoniKishner RoniKishner deleted the split-pr-21-1783449463-main branch July 7, 2026 18:40
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