From 8e5c740e7adb02c687ca7246ac02d08d2e578a66 Mon Sep 17 00:00:00 2001 From: KurimuzonAkuma Date: Thu, 28 Nov 2024 10:42:32 +0300 Subject: [PATCH] Update test_markdown.py --- tests/parser/test_markdown.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/parser/test_markdown.py b/tests/parser/test_markdown.py index 584479d882..98b7c31fdf 100644 --- a/tests/parser/test_markdown.py +++ b/tests/parser/test_markdown.py @@ -137,3 +137,11 @@ def test_markdown_unparse_no_entities(): entities = [] assert Markdown.unparse(text=text, entities=entities) == expected + +def test_markdown_unparse_html(): + expected = "__This works, it's ok__ This shouldn't" + text = "This works, it's ok This shouldn't" + entities = pyrogram.types.List( + [pyrogram.types.MessageEntity(type=pyrogram.enums.MessageEntityType.ITALIC, offset=0, length=19)]) + + assert Markdown.unparse(text=text, entities=entities) == expected