aiogram/tests/test_utils/test_markdown.py
2020-11-08 21:48:49 +00:00

13 lines
315 B
Python

import pytest
from aiogram.utils import markdown
class TestMarkdownEscape:
def test_equality_sign_is_escaped(self):
if markdown.escape_md(r"e = mc2") != r"e \= mc2":
raise AssertionError
def test_pre_escaped(self):
if markdown.escape_md(r"hello\.") != r"hello\\\.":
raise AssertionError