failed NO_PATCH NO_PATCH UNSUBMITTED empty_patch(None) · None tool calls · 0 s · Textualize/rich
Inline table code Fixes https://github.com/Textualize/rich/issues/4038
| # | Tool | Arguments | Result |
|---|---|---|---|
| No trace captured. | |||
.......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 [0m[38;2;248;248;242;48;2;39;40;34mprint[0m[38;2;248;248;242;48;2;39;40;34m([0m[38;2;230;219;116;48;2;39;40;34m'[0m[38;2;230;219;116;48;2;39;40;34mhello[0m[38;2;230;219;116;48;2;39;40;34m'[0m[38;2;248;248;242;48;2;39;40;34m)[0m[38;2;248;248;242;48;2;39;40;34m;[0m[36m [0m
E + 36m [0m[1;36;40mprint[0m[1;36;40m([0m[1;36;40m'[0m[1;36;40mhello[0m[1;36;40m'[0m[1;36;40m)[0m[1;36;40m;[0m[36m [0m
E [36m [0m
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