From 3f66e95a90fd2ee73a90888de97db5c3a41fb4d2 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 19 Apr 2021 14:39:39 -0400 Subject: [PATCH] Use addopts instead of testpaths to specify path in pytest config The pytest documentation states that the testpaths configuration option "Sets list of directories that should be searched ... when executing pytest from the rootdir directory." Since pytest is not executed from the rootdir directory, testpaths has no effect. Appending the "tests/" directory to the end of addopts reduces the time required to run the test suite by approximately 6 seconds. --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bbf778536..0245f12a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,5 @@ log_cli = 1 log_cli_level = "DEBUG" log_cli_format = "%(asctime)s [%(levelname)s] %(module)s.%(funcName)s.%(lineno)d: %(message)s" log_cli_date_format = "%H:%M:%S" -addopts = "-v --capture=sys" +addopts = "-v --capture=sys tests" norecursedirs = "node_modules dist" -testpaths = "monkey/tests"