← baseline_full_v2

rich_4079

failed NO_PATCH NO_PATCH UNSUBMITTED empty_patch(None) · None tool calls · 0 s · Textualize/rich

Task input

Inline table code

Fixes https://github.com/Textualize/rich/issues/4038

Tool calls (0)

#ToolArgumentsResult
No trace captured.

Test output

show
.......F
=================================== FAILURES ===================================
_______________________ test_inline_code_in_table_cells ________________________

    def test_inline_code_in_table_cells() -> None:
        """Test inline code in table cells.
    
        Regression test for https://github.com/Textualize/rich/issues/4038
    
        """
        markdown = Markdown(
            "| Col |\n|---|\n| `print('hello');` |\n",
            inline_code_theme="monokai",
            inline_code_lexer="python",
        )
        result = render(markdown)
        expected = "\n\x1b[36m                 \x1b[0m\n\x1b[36m \x1b[0m\x1b[36mCol\x1b[0m\x1b[1m            \x1b[0m\x1b[36m \x1b[0m\n\x1b[36m ─────────────── \x1b[0m\n\x1b[36m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mprint\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m(\x1b[0m\x1b[38;2;230;219;116;48;2;39;40;34m'\x1b[0m\x1b[38;2;230;219;116;48;2;39;40;34mhello\x1b[0m\x1b[38;2;230;219;116;48;2;39;40;34m'\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m)\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m;\x1b[0m\x1b[36m \x1b[0m\n\x1b[36m                 \x1b[0m\n"
>       assert result == expected
E       AssertionError: assert '\n\x1b[36m  ...    \x1b[0m\n' == '\n\x1b[36m  ...    \x1b[0m\n'
E         
E         Skipping 110 identical leading characters in diff, use -v to show
E         - 36m print('hello'); 
E         + 36m print('hello'); 
E                            

tests/test_markdown.py:215: AssertionError
----------------------------- Captured stdout call -----------------------------
"\n\x1b[36m                 \x1b[0m\n\x1b[36m \x1b[0m\x1b[36mCol\x1b[0m\x1b[1m            \x1b[0m\x1b[36m \x1b[0m\n\x1b[36m ─────────────── \x1b[0m\n\x1b[36m \x1b[0m\x1b[1;36;40mprint\x1b[0m\x1b[1;36;40m(\x1b[0m\x1b[1;36;40m'\x1b[0m\x1b[1;36;40mhello\x1b[0m\x1b[1;36;40m'\x1b[0m\x1b[1;36;40m)\x1b[0m\x1b[1;36;40m;\x1b[0m\x1b[36m \x1b[0m\n\x1b[36m                 \x1b[0m\n"
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
1 failed, 7 passed in 0.21s