Skip to content

[TEST] Increase UI and utility function coverage#403

Open
RainRat wants to merge 1 commit intomainfrom
test-coverage-ui-formatting-3457644811002458042
Open

[TEST] Increase UI and utility function coverage#403
RainRat wants to merge 1 commit intomainfrom
test-coverage-ui-formatting-3457644811002458042

Conversation

@RainRat
Copy link
Owner

@RainRat RainRat commented Feb 26, 2026

Increased test coverage by adding robust unit tests for UI formatting and terminal utility functions.

Changes made:

  • Updated tests/test_ui_formatting.py:
    • Added TestGetStrategyColor: Verifies mapping of strategy labels to correct ANSI colors.
    • Added TestGetSeparator: Verifies terminal-aware horizontal separators with max_width constraints and OSError fallbacks.
    • Added TestPrintStatusLine: Verifies terminal-aware status line printing with proper padding and newline-based fallback for non-terminal environments.
    • Added necessary imports (shutil, unittest.mock).

These changes address the primary "Gap Analysis" priority by providing coverage for widely-used but previously untested utility functions.


PR created automatically by Jules for task 3457644811002458042 started by @RainRat

This commit increases the test coverage of the `evolverstage` project
by adding direct unit tests for `get_strategy_color`, `get_separator`,
and `print_status_line` in `tests/test_ui_formatting.py`.

The new tests verify:
- ANSI color mapping for all tactical strategy categories.
- Terminal width detection and capping logic for separators.
- Robust fallback behavior for restricted or non-interactive terminal
  environments using mocks for `shutil.get_terminal_size` and `print`.

Co-authored-by: RainRat <20098977+RainRat@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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