From 5e3bbb946fb47ad2f35a0eb9ea48c66368dbe7b6 Mon Sep 17 00:00:00 2001 From: Silen Naihin Date: Wed, 26 Jul 2023 01:50:53 +0100 Subject: [PATCH] fix suite dependencies (#194) --- agbenchmark/conftest.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/agbenchmark/conftest.py b/agbenchmark/conftest.py index d3f63c88..76c08064 100644 --- a/agbenchmark/conftest.py +++ b/agbenchmark/conftest.py @@ -211,13 +211,17 @@ def pytest_collection_modifyitems(items: Any, config: Any) -> None: if ( config.getoption("--improve") or config.getoption("--category") - or config.getoption("--suite") + or test_class_instance.setup_dependencies # same_task suite ): dependencies = [dep for dep in dependencies if not data.get(dep, None)] - if config.getoption("--test"): - dependencies = [] - - if config.getoption("--no_dep"): + if ( + config.getoption("--test") + or ( # separate task suite + not test_class_instance.setup_dependencies + and config.getoption("--suite") + ) + or config.getoption("--no_dep") + ): dependencies = [] categories = test_class_instance.data.category