From d956e0c2b15f58833b67f6de65951b6afd376f1a Mon Sep 17 00:00:00 2001 From: Pavol Sloboda Date: Mon, 2 Mar 2026 13:48:54 +0100 Subject: [PATCH 1/2] Simplified the python version detection logic from an if else statement to a simple int conversion of the logical statement --- test/run-openshift-pytest | 2 +- test/run-pytest | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/run-openshift-pytest b/test/run-openshift-pytest index 3003133c..b5424240 100755 --- a/test/run-openshift-pytest +++ b/test/run-openshift-pytest @@ -10,7 +10,7 @@ THISDIR=$(dirname ${BASH_SOURCE[0]}) git show -s -if python3 -c 'import sys; sys.exit(0 if sys.version_info < (3,13) else 1)'; then +if python3 -c 'import sys;sys.exit(int(sys.version_info < (3,13)))'; then PYTHON_VERSION="3.12" else PYTHON_VERSION="3" diff --git a/test/run-pytest b/test/run-pytest index d5e292f8..f6eb82fd 100755 --- a/test/run-pytest +++ b/test/run-pytest @@ -10,7 +10,7 @@ THISDIR=$(dirname ${BASH_SOURCE[0]}) git show -s -if python3 -c 'import sys; sys.exit(0 if sys.version_info < (3,13) else 1)'; then +if python3 -c 'import sys;sys.exit(int(sys.version_info < (3,13)))'; then PYTHON_VERSION="3.12" else PYTHON_VERSION="3" From 93f1a131e33d4fed727c8e1ef0eae394866fa38a Mon Sep 17 00:00:00 2001 From: Pavol Sloboda Date: Mon, 2 Mar 2026 15:38:43 +0100 Subject: [PATCH 2/2] Fixup since bash the opposite true values for int as python --- test/run-openshift-pytest | 2 +- test/run-pytest | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/run-openshift-pytest b/test/run-openshift-pytest index b5424240..8c5c9680 100755 --- a/test/run-openshift-pytest +++ b/test/run-openshift-pytest @@ -10,7 +10,7 @@ THISDIR=$(dirname ${BASH_SOURCE[0]}) git show -s -if python3 -c 'import sys;sys.exit(int(sys.version_info < (3,13)))'; then +if python3 -c 'import sys;sys.exit(int(sys.version_info >= (3,13)))'; then PYTHON_VERSION="3.12" else PYTHON_VERSION="3" diff --git a/test/run-pytest b/test/run-pytest index f6eb82fd..1dffa9db 100755 --- a/test/run-pytest +++ b/test/run-pytest @@ -10,7 +10,7 @@ THISDIR=$(dirname ${BASH_SOURCE[0]}) git show -s -if python3 -c 'import sys;sys.exit(int(sys.version_info < (3,13)))'; then +if python3 -c 'import sys;sys.exit(int(sys.version_info >= (3,13)))'; then PYTHON_VERSION="3.12" else PYTHON_VERSION="3"