nonebot-bison/tests/test_render.py
2022-02-12 00:48:25 +08:00

29 lines
1.0 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import typing
import pytest
from nonebug.app import App
if typing.TYPE_CHECKING:
import sys
sys.path.append("./src/plugins")
import nonebot_bison
@pytest.mark.asyncio
@pytest.mark.render
async def test_render(app: App):
from nonebot_bison.utils import Render
render = Render()
res = await render.text_to_pic(
"""a\nbbbbbbbbbbbbbbbbbbbbbb\ncd
<h1>中文</h1>
VuePress 由两部分组成:第一部分是一个极简静态网站生成器
(opens new window),它包含由 Vue 驱动的主题系统和插件 API另一个部分是为书写技术文档而优化的默认主题它的诞生初衷是为了支持 Vue 及其子项目的文档需求。
每一个由 VuePress 生成的页面都带有预渲染好的 HTML也因此具有非常好的加载性能和搜索引擎优化SEO。同时一旦页面被加载Vue 将接管这些静态内容并将其转换成一个完整的单页应用SPA其他的页面则会只在用户浏览到的时候才按需加载。
"""
)