From 6a66d7cad70aa438fcee54f8cd227b282da90f1a Mon Sep 17 00:00:00 2001 From: Pierrick Rambaud Date: Thu, 7 Sep 2023 15:35:12 +0000 Subject: [PATCH 1/2] fix: run coverage instead of pytest-cov https://stackoverflow.com/questions/62221654/how-to-get-coverage-reporting-when-testing-a-pytest-plugin --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 54deb3b..f113a4d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -20,7 +20,7 @@ def test(session): """Run all the test using the environment variable of the running machine.""" session.install(".[test]") test_files = session.posargs or ["tests"] - session.run("pytest", "--color=yes", "--cov", "--cov-report=xml", *test_files) + session.run("coverage", "run", "-m", "pytest", "--color=yes", *test_files) @nox.session(reuse_venv=True, name="dead-fixtures") From 30c44951ddc81613eb6341ce84499f0e67b99281 Mon Sep 17 00:00:00 2001 From: Pierrick Rambaud Date: Thu, 7 Sep 2023 15:36:09 +0000 Subject: [PATCH 2/2] build(deps): drop pytest-cov dependency --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f6cd0bf..90b98bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,8 +48,8 @@ dev = [ ] test = [ "pytest", + "coverage", "pytest-sugar", - "pytest-cov", "pytest-deadfixtures" ] doc = [