From e05075b9c9d0301e11718d4013940c27c2021ae1 Mon Sep 17 00:00:00 2001 From: Hadrien Mary Date: Tue, 7 Jan 2025 12:53:47 -0500 Subject: [PATCH] Consider `tests[].python.python_version` when linting for cfep25 on v1 --- conda_smithy/lint_recipe.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conda_smithy/lint_recipe.py b/conda_smithy/lint_recipe.py index 2395b97a5..554202edd 100644 --- a/conda_smithy/lint_recipe.py +++ b/conda_smithy/lint_recipe.py @@ -523,6 +523,9 @@ def run_conda_forge_specific( test_reqs += (test_element.get("requirements") or {}).get( "run" ) or [] + + if "python" in test_element and test_element["python"].get("python_version") is not None: + test_reqs.append(f"python {test_element["python"]['python_version']}") else: test_section = get_section(meta, "test", lints, recipe_version) test_reqs = test_section.get("requires") or []