From 735298e28e6bab9824d779620044b9834bf09185 Mon Sep 17 00:00:00 2001 From: Erwin de Gelder Date: Wed, 5 Nov 2025 15:01:43 +0100 Subject: [PATCH] Ensure coverage can be measured. --- pyproject.toml | 3 +++ tox.ini | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9ab736f9..751c9d41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -113,5 +113,8 @@ addopts = """ # Maps coverage measured in site-packages to source files in src source = ["src/", ".tox/*/lib/python*/site-packages/"] +[tool.coverage.run] +source = ["matplot2tikz"] + [tool.coverage.html] directory = "reports/coverage_html" diff --git a/tox.ini b/tox.ini index dc4ab284..904c5309 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ setenv = PY_IGNORE_IMPORTMISMATCH=1 # https://github.com/pytest-dev/pytest/issues/2042 COVERAGE_FILE = reports{/}.coverage.{envname} COVERAGE_PROCESS_START = {toxinidir}/pyproject.toml - PIP_PREFER_BINARY = True + SETUPTOOLS_SHIM = 1 commands = # Run tests from .py files pytest --typeguard-packages=matplot2tikz --junitxml=reports/pytest.xml.{envname} {posargs}