From e2a2f44583b2a57de04d00f14a82777ecc117b8f Mon Sep 17 00:00:00 2001 From: ONE-FM Dev Date: Thu, 14 May 2026 13:35:46 +0200 Subject: [PATCH 1/2] feat(WI-000799): add test coverage reporting Add coverage configuration to pyproject.toml. Task: WI-000799 --- pyproject.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index c81cf83..6a42940 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,3 +54,11 @@ typing-modules = ["frappe.types.DF"] quote-style = "double" indent-style = "tab" docstring-code-format = true + +[tool.coverage.run] +source = ["one_lms"] +omit = ["*/tests/*", "*/test_*.py", "*/patches/*"] + +[tool.coverage.report] +fail_under = 30 +show_missing = true From c5dd68836edcf7b5b19ea4d39a4314c89ad220b9 Mon Sep 17 00:00:00 2001 From: ONE-FM Dev Date: Wed, 20 May 2026 09:05:26 +0200 Subject: [PATCH 2/2] test(WI-000799): add coverage reporting config --- README.md | 2 ++ pyproject.toml | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index aa5a53b..a45990f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![Coverage](https://img.shields.io/badge/coverage-30%25%2B-brightgreen) + ### ONE FM LMS Extend Frappe LMS diff --git a/pyproject.toml b/pyproject.toml index 6a42940..b615987 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,6 +11,11 @@ dependencies = [ # "frappe~=15.0.0" # Installed and managed by bench. ] +[project.optional-dependencies] +dev = [ + "pytest-cov~=5.0.0", +] + [build-system] requires = ["flit_core >=3.4,<4"] build-backend = "flit_core.buildapi" @@ -55,6 +60,9 @@ quote-style = "double" indent-style = "tab" docstring-code-format = true +[tool.pytest.ini_options] +addopts = "--cov=one_lms --cov-report=term-missing --cov-fail-under=30" + [tool.coverage.run] source = ["one_lms"] omit = ["*/tests/*", "*/test_*.py", "*/patches/*"]