mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 10:08:40 +00:00
test
This commit is contained in:
parent
28c016a142
commit
7593e4b271
1 changed files with 9 additions and 0 deletions
|
@ -97,6 +97,15 @@ def test_markdown_render():
|
|||
assert rendered_markdown == expected
|
||||
|
||||
|
||||
def test_inline_code():
|
||||
markdown = Markdown("inline `import this` code", inline_code_theme="emacs")
|
||||
result = render(markdown)
|
||||
expected = "inline \x1b[1;38;2;170;34;255;48;2;248;248;248mimport\x1b[0m\x1b[38;2;0;0;0;48;2;248;248;248m \x1b[0m\x1b[1;38;2;0;0;255;48;2;248;248;248mthis\x1b[0m code \n"
|
||||
print(result)
|
||||
print(repr(result))
|
||||
assert result == expected
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
markdown = Markdown(MARKDOWN)
|
||||
rendered = render(markdown)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue