From e5544532b3c90e8b9aece77341a9ec52325e863d Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Thu, 24 Oct 2024 05:15:41 +0200 Subject: [PATCH] Sandbox: Configure pytest in `pyproject.toml` --- pyproject.toml | 20 ++++++++++++++++++++ pytest.ini | 4 ---- 2 files changed, 20 insertions(+), 4 deletions(-) delete mode 100644 pytest.ini diff --git a/pyproject.toml b/pyproject.toml index 255f82ed..ebdc8925 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,3 +48,23 @@ lint.per-file-ignores."tests/*" = [ "ERA001", # Found commented-out code. "S101", # Allow use of `assert`, and `print`. ] + +[tool.pytest.ini_options] +addopts = """ + -rfEXs -p pytester --strict-markers --verbosity=3 + --cov --cov-report=term-missing --cov-report=xml + """ +filterwarnings = [ + "error::UserWarning", +] +log_level = "DEBUG" +log_cli_level = "DEBUG" +log_format = "%(asctime)-15s [%(name)-36s] %(levelname)-8s: %(message)s" +minversion = "2.0" +testpaths = [ + "responder", + "tests", +] +markers = [ +] +xfail_strict = true diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 965cd907..00000000 --- a/pytest.ini +++ /dev/null @@ -1,4 +0,0 @@ -[pytest] -addopts= -rsxX -s -vvv --strict -filterwarnings = - error::UserWarning