Skip to content

Update tests/test_output_formatter.py#15

Closed
sashimikun wants to merge 1 commit into
AsyncFuncAI:mainfrom
sashimikun:rlm-wiki/code-anything-48986488-update-tests-test-output-formatter-p
Closed

Update tests/test_output_formatter.py#15
sashimikun wants to merge 1 commit into
AsyncFuncAI:mainfrom
sashimikun:rlm-wiki/code-anything-48986488-update-tests-test-output-formatter-p

Conversation

@sashimikun

@sashimikun sashimikun commented Apr 27, 2026

Copy link
Copy Markdown

Summary

I see the current state: the file has been partially modified with 15 tests (236 lines). TestFormatText and TestFormatMarkdown got their edge-case tests, but TestFormatJson and TestFormatOutput did not. The JIT output shows exact line positions: TestFormatJson ends at line 188 with assert data["metadata"]["files_reviewed"] == 1, followed by two blank lines (189-190), then class TestFormatOutput: at line 191. The file ends at line 236 with an empty line after assert u"— AsyncReview" in result on line 235.
I need to apply the two remaining edits using the exact anchor strings from the current file state.

Changed files

  • npx/python/uv.lock
  • tests/test_output_formatter.py

Verification

  • Updated from a Code Anything follow-up.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new test suite for the output formatting module, covering text, markdown, and JSON formats. The review feedback recommends removing redundant Python 2-style string prefixes and strengthening markdown assertions to check for specific formatting elements.

Comment on lines +26 to +28
assert u" • src/main.py" in result
assert u" • src/utils.py" in result
assert u"— AsyncReview • gemini/gemini-3-pro-preview" in result

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The u prefix for string literals is redundant in Python 3. Since this project uses modern Python features (like PEP 604 union types in the source code), these prefixes can be removed to keep the code clean and idiomatic.

Suggested change
assert u" • src/main.py" in result
assert u" • src/utils.py" in result
assert u"— AsyncReview • gemini/gemini-3-pro-preview" in result
assert " • src/main.py" in result
assert " • src/utils.py" in result
assert "— AsyncReview • gemini/gemini-3-pro-preview" in result

Comment on lines +52 to +56
assert "## Review" in result
assert "### Sources" in result
assert "src/main.py" in result
assert "---" in result
assert "AsyncReview" in result

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These assertions are quite loose and don't verify the specific Markdown formatting (like backticks for sources or italicization for the footer). Strengthening these assertions will better protect against formatting regressions.

Suggested change
assert "## Review" in result
assert "### Sources" in result
assert "src/main.py" in result
assert "---" in result
assert "AsyncReview" in result
assert "## Review" in result
assert "### Sources" in result
assert "- `src/main.py`" in result
assert "---" in result
assert "*AsyncReview • gemini/gemini-3-pro-preview*" in result

@sashimikun sashimikun force-pushed the rlm-wiki/code-anything-48986488-update-tests-test-output-formatter-p branch from ac80f13 to 4913371 Compare April 27, 2026 17:57
@sashimikun sashimikun closed this Apr 28, 2026
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