From 71d8296fe6849259b31540a2057262253c550090 Mon Sep 17 00:00:00 2001 From: tadeubas Date: Fri, 23 Aug 2024 09:41:24 -0300 Subject: [PATCH] poetry task to ensure htmlcov files are always recreated --- pyproject.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f2d9a1e9..0aa1130c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,12 +84,14 @@ lint = ["lint-src", "lint-scripts"] pylint.ref = "lint" # test tasks -test = "pytest --cache-clear --cov src/krux --cov-report html ./tests --cov-context=test --cov-report term-missing" +test-clean = """python -c 'import shutil; shutil.rmtree("htmlcov")'""" +test-cov = "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 -tests.ref = "test" -pytest.ref = "test" +tests = ["test-clean", "test-cov"] +test.ref = "tests" +pytest.ref = "tests" # pre commit task (do formatting, linting and tests) pre-commit = ["format", "lint", "i18n validate", "test-simple"]