From 07aa81fddaaefb3516a11066332ff2ad6094a208 Mon Sep 17 00:00:00 2001 From: DeadNews Date: Wed, 19 Jul 2023 00:10:42 +0530 Subject: [PATCH] ci: move `pytest` command --- pyproject.toml | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e8d6258..d63c322 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,16 +37,31 @@ types-pyyaml = "^6.0.12.9" pytest = "^7.4.0" pytest-cov = "^4.1.0" +[tool.poetry-dynamic-versioning] +enable = true +vcs = "git" +style = "semver" + [tool.poe.tasks] ruff = "ruff check ." black = "black --check ." mypy = "mypy ." lint.sequence = ["ruff", "black", "mypy"] -[tool.poetry-dynamic-versioning] -enable = true -vcs = "git" -style = "semver" +[tool.poe.tasks.test] +cmd = "pytest --cov-report=xml" + +[tool.pytest.ini_options] +addopts = "--verbose --cov=./src --cov-report=term" +testpaths = ["tests"] +markers = ["online"] + +[tool.coverage.report] +exclude_lines = [ + "# pragma: no cover", + "if __name__ == .__main__.:", + "if TYPE_CHECKING:", +] [tool.black] line-length = 99 @@ -63,14 +78,6 @@ warn_unused_ignores = true module = ["tests.*"] allow_untyped_defs = true -[tool.pytest.ini_options] -addopts = "--verbose --cov=./src" -testpaths = ["tests"] -markers = ["docker", "key_required"] - -[tool.coverage.report] -exclude_lines = ["if TYPE_CHECKING:", "if __name__ == .__main__.:"] - [tool.ruff] line-length = 99 select = ["ALL"]