From 2944dab48ae7ca17dd4c53a6a5408e4a2f84b416 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 26 Aug 2023 16:07:24 -0700 Subject: [PATCH] Only parse version if defined --- tests/test_verify_build.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_verify_build.py b/tests/test_verify_build.py index dce197aa..c7c4782a 100644 --- a/tests/test_verify_build.py +++ b/tests/test_verify_build.py @@ -4,7 +4,6 @@ Verify relenv builds. """ import os -import packaging import pathlib import platform import shutil @@ -12,6 +11,7 @@ import sys import textwrap +import packaging import pytest from relenv.common import DATA_DIR, get_triplet, list_archived_builds, plat_from_triplet @@ -174,7 +174,10 @@ def test_pip_install_salt_git(pipexec, build, tmp_path, pyexec): @pytest.mark.skip_on_darwin @pytest.mark.skip_on_windows @pytest.mark.skipif( - packaging.version.parse(get_build_version()) >= packaging.version.parse("3.11.4"), reason="3.11.4 will not work with 3005.x" + get_build_version() + and packaging.version.parse(get_build_version()) + >= packaging.version.parse("3.11.4"), + reason="3.11.4 will not work with 3005.x", ) def test_pip_install_salt(pipexec, build, tmp_path, pyexec): packages = [