From ba7f94265736be8e31d693ffdddf4608891952d3 Mon Sep 17 00:00:00 2001 From: Robert de Vries Date: Sun, 5 Jul 2026 16:35:30 +0200 Subject: [PATCH] Reinstate the possibility to run coverage tests using make cov. --- .coveragerc | 5 ----- Makefile | 10 +++++----- pyproject.toml | 1 + 3 files changed, 6 insertions(+), 10 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 8fc516b..0000000 --- a/.coveragerc +++ /dev/null @@ -1,5 +0,0 @@ -[run] -omit = - */_build_ffi.py - */_build_wolfssl.py - */_ffi.py \ No newline at end of file diff --git a/Makefile b/Makefile index c1f5662..45f0eb1 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ for line in sys.stdin: print("%-20s %s" % (target, help)) endef export PRINT_HELP_PYSCRIPT -BROWSER := python -c "$$BROWSER_PYSCRIPT" +BROWSER := uv run python -c "$$BROWSER_PYSCRIPT" help: @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) @@ -63,10 +63,10 @@ test-all: ## run tests on every Python version with tox check-all: test-all ## run tests on every Python version with tox -cov: install ## check code coverage quickly with the default Python - py.test --cov-config .coveragerc --cov=wolfcrypt tests - coverage report -m - coverage html +cov: ## check code coverage quickly with the default Python + uv run pytest --cov=wolfcrypt tests + uv run coverage report -m + uv run coverage html $(BROWSER) htmlcov/index.html docs: install ## generate Sphinx HTML documentation, including API docs diff --git a/pyproject.toml b/pyproject.toml index 8f95d18..43e1c90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,6 +37,7 @@ build-backend = "setuptools.build_meta:__legacy__" dev = [ "mypy", "pytest", + "pytest-cov", "ruff", "sphinx", "sphinx-rtd-theme",