From 06edf1a76bbca5a599baadda614e91c9b94d5e26 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Tue, 6 Jun 2023 14:07:45 +0200 Subject: [PATCH] test refactor: put pytest config in pyproject.toml --- integration-tests/requirements.txt | 1 + pyproject.toml | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/integration-tests/requirements.txt b/integration-tests/requirements.txt index a6f3d17..c086c7f 100644 --- a/integration-tests/requirements.txt +++ b/integration-tests/requirements.txt @@ -1,3 +1,4 @@ pytest +pytest-cov pytest-asyncio git+https://github.com/yuvipanda/hubtraf.git diff --git a/pyproject.toml b/pyproject.toml index 170be20..d0e97f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,3 +32,24 @@ target_version = [ "py310", "py311", ] + + +# pytest is used for running Python based tests +# +# ref: https://docs.pytest.org/en/stable/ +# +[tool.pytest.ini_options] +addopts = "--verbose --color=yes --durations=10 --maxfail=1 --cov=tljh" +asyncio_mode = "auto" + + +# pytest-cov / coverage is used to measure code coverage of tests +# +# ref: https://coverage.readthedocs.io/en/stable/config.html +# +[tool.coverage.run] +parallel = true +omit = [ + "tests/**", + "integration-tests/**", +]