From 98751a3cb3d1e7b2c7a4d4be76f7987310decb80 Mon Sep 17 00:00:00 2001 From: Hendrik Jung Date: Mon, 6 Jul 2026 14:45:26 +0200 Subject: [PATCH] fix tests to also work with filelock > 3.29.4 --- tests/trajectory/test_propagate.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/trajectory/test_propagate.py b/tests/trajectory/test_propagate.py index 918cd9a..d848484 100644 --- a/tests/trajectory/test_propagate.py +++ b/tests/trajectory/test_propagate.py @@ -227,6 +227,8 @@ async def test_run_continue_remove_with_gromacs( # mda version 2.2.0 and fasteners does not remove lock files) # - filelock removes lockfiles on win with filelock version >= 3.25.1 # - filelock removes lockfiles on unix with filelock version >= 3.20.4 + # and then stopped removing them again with version 3.29.5, + # see: https://github.com/tox-dev/filelock/pull/577 try: import filelock except ImportError: @@ -237,9 +239,14 @@ async def test_run_continue_remove_with_gromacs( else: # lockfile used instead of fasteners if os.name == "posix": - files_per_traj = ( - 2 if Version(filelock.__version__) >= Version("3.20.4") - else 3) + files_per_traj = 3 + if ( + Version("3.29.5") + > Version(filelock.__version__) + >= Version("3.20.4") + ): + # we are in the version range that removes the lockfiles + files_per_traj -= 1 elif os.name == "nt": files_per_traj = ( 2 if Version(filelock.__version__) >= Version("3.25.1")