From 3c008571ffed3218467f40e13a4b7a5ff1eaed91 Mon Sep 17 00:00:00 2001 From: tadeubas Date: Fri, 23 Aug 2024 09:21:07 -0300 Subject: [PATCH] coverage report adding context to show what test function executed the specific line of the code --- .coveragerc | 2 ++ pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..1dc4f3d8 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,2 @@ +[html] +show_contexts = True diff --git a/pyproject.toml b/pyproject.toml index bca3a1e0..f2d9a1e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,7 +84,7 @@ lint = ["lint-src", "lint-scripts"] pylint.ref = "lint" # test tasks -test = "pytest --cache-clear --cov src/krux --cov-report html ./tests" +test = "pytest --cache-clear --cov src/krux --cov-report html ./tests --cov-context=test --cov-report term-missing" test-verbose = "pytest --cache-clear --cov src/krux --cov-report html --show-capture all --capture tee-sys -r A ./tests" test-simple = "pytest --cache-clear ./tests" # aliases