From 9d01072cacb7d5151b7ed9387b3048f55462c31a Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Mon, 10 Jun 2024 17:31:59 +0200 Subject: [PATCH] Fix test_utils.compatible_with (#372) Fixes https://github.com/schrodinger/pymol-open-source/issues/370 --- testing/tests/helpers/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/tests/helpers/test_utils.py b/testing/tests/helpers/test_utils.py index 301b44747..f4d4340d9 100644 --- a/testing/tests/helpers/test_utils.py +++ b/testing/tests/helpers/test_utils.py @@ -111,7 +111,7 @@ def assert_in_names_undo(cmd, name: str) -> None: def compatible_with(version: str) -> bool: def tupleize_version(str_: str): - return tuple(int(x) for x in str_.partition('.')[0::2] if x.isdigit()) + return tuple(int(x) for x in str_.split('.') if x.isdigit()) PYMOL_VERSION = cmd.get_version() PYMOL_VERSION_TUPLE = tupleize_version(PYMOL_VERSION[0])