From 9064b31fe9ab116df24f3fc2ba1944c175039a05 Mon Sep 17 00:00:00 2001 From: passthem Date: Sat, 7 Mar 2026 16:21:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=98=BE=E7=A4=BA=20coverage?= =?UTF-8?q?=20=E7=9A=84=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- justfile | 6 +++++- pyproject.toml | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index e2f4ca3..8533c1c 100644 --- a/justfile +++ b/justfile @@ -2,4 +2,8 @@ watch: poetry run watchfiles bot.main . --filter scripts.watch_filter.filter test: - poetry run pytest --cov=konabot --cov-report term-missing:skip-covered + poetry run pytest --cov-report term-missing:skip-covered + +coverage: + poetry run pytest --cov-report html + python -m http.server -d htmlcov diff --git a/pyproject.toml b/pyproject.toml index 5b0c03d..61f0558 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,7 @@ testpaths = "tests" python_files = "test_*.py" asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "session" +addopts = "--cov=./konabot/" [tool.nonebot] # plugin_dirs = ["konabot/plugins/"]