Skip to content

Commit 9a877f2

Browse files
ShlomoSteptclaude
andcommitted
Fix duplicate test method by renaming to unique name
The test file had two methods named `test_tool_result_with_ansi_codes` at lines 512 and 545 in TestRenderContentBlock class. The second one was silently overriding the first. - Renamed second test to `test_tool_result_with_ansi_codes_snapshot` - Updated docstring to clarify the test's purpose - Renamed snapshot file to match new test name - Both tests now run correctly (5 ANSI-related tests pass) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 62ff001 commit 9a877f2

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

tests/__snapshots__/test_generate_html/TestRenderContentBlock.test_tool_result_with_ansi_codes.html renamed to tests/__snapshots__/test_generate_html/TestRenderContentBlock.test_tool_result_with_ansi_codes_snapshot.html

File renamed without changes.

tests/test_generate_html.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,12 @@ def test_tool_result_with_commit(self, snapshot_html):
542542
finally:
543543
claude_code_transcripts._github_repo = old_repo
544544

545-
def test_tool_result_with_ansi_codes(self, snapshot_html):
546-
"""Test that ANSI escape codes are stripped from tool results."""
545+
def test_tool_result_with_ansi_codes_snapshot(self, snapshot_html):
546+
"""Test ANSI escape code stripping with snapshot comparison.
547+
548+
This is a snapshot test companion to test_tool_result_with_ansi_codes
549+
that verifies the complete HTML output structure.
550+
"""
547551
block = {
548552
"type": "tool_result",
549553
"content": "\x1b[38;2;166;172;186mTests passed:\x1b[0m \x1b[32m✓\x1b[0m All 5 tests passed\n\x1b[1;31mError:\x1b[0m None",

0 commit comments

Comments
 (0)