mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-07 20:33:01 +08:00
* feat(workflow pytest): 添加打上test-render的标签后进行带render标记测试的功能
fix(workflow pytest): 将env变量变成直接的表达式
fix(test): 删除重复的测试,补充assert
👷 change poetry install action
* ci(workflow): 将触发 all-test 测试的标签更名从 test-render 更名为 all-test
ci(codecov): 为 smoke-test 和 all-test 设置不同的 codecov target
27 lines
1.0 KiB
Python
27 lines
1.0 KiB
Python
import typing
|
||
|
||
import pytest
|
||
from httpx import AsyncClient
|
||
from nonebug.app import App
|
||
|
||
|
||
@pytest.mark.asyncio
|
||
@pytest.mark.render
|
||
async def test_render(app: App):
|
||
from nonebot_bison.plugin_config import plugin_config
|
||
from nonebot_bison.utils import parse_text
|
||
|
||
plugin_config.bison_use_pic = True
|
||
|
||
res = await parse_text(
|
||
"""a\nbbbbbbbbbbbbbbbbbbbbbb\ncd
|
||
<h1>中文</h1>
|
||
VuePress 由两部分组成:第一部分是一个极简静态网站生成器
|
||
|
||
(opens new window),它包含由 Vue 驱动的主题系统和插件 API,另一个部分是为书写技术文档而优化的默认主题,它的诞生初衷是为了支持 Vue 及其子项目的文档需求。
|
||
|
||
每一个由 VuePress 生成的页面都带有预渲染好的 HTML,也因此具有非常好的加载性能和搜索引擎优化(SEO)。同时,一旦页面被加载,Vue 将接管这些静态内容,并将其转换成一个完整的单页应用(SPA),其他的页面则会只在用户浏览到的时候才按需加载。
|
||
"""
|
||
)
|
||
assert res.type == "image"
|