From e393e00ba55cf15a828cdd7d2441cb340320c461 Mon Sep 17 00:00:00 2001 From: Ingmar Schoegl Date: Wed, 15 Feb 2023 11:37:59 -0600 Subject: [PATCH] [SCons] Check for pytest when running scons test Addendum to #1434; update ensures that checks are run for all tests of the test suite that involve pytest. --- SConstruct | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SConstruct b/SConstruct index 6b5d68a73d..681626ef12 100644 --- a/SConstruct +++ b/SConstruct @@ -1698,9 +1698,11 @@ ruamel_min_version = parse_version('0.15.34') pytest_min_version = parse_version("4.6.9") # Pytest is required only to test the Python module -check_for_pytest = any( - target.startswith("test-python") for target in COMMAND_LINE_TARGETS -) +check_for_pytest = False +if env['python_package'] != 'none': + check_for_pytest = "test" in COMMAND_LINE_TARGETS or any( + target.startswith("test-python") for target in COMMAND_LINE_TARGETS + ) # Check for the minimum ruamel.yaml version, 0.15.34, at install and test # time. The check happens at install and test time because ruamel.yaml is