Skip to content

Commit 573828a

Browse files
authored
fix(tests): update fsspec version check causing failure on master (#21330)
* fix(tests): update fsspec version check to use compare_version utility * let's retrigger, probot is still failing when all tests pased
1 parent 32442c2 commit 573828a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/tests_pytorch/trainer/connectors/test_checkpoint_connector.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
import errno
15+
import operator
1516
import os
1617
import re
1718
from unittest import mock
1819
from unittest.mock import ANY, Mock
1920

20-
import fsspec
2121
import pytest
2222
import torch
23+
from lightning_utilities.core.imports import compare_version
2324

2425
from lightning.pytorch import Trainer
2526
from lightning.pytorch.callbacks import Callback, ModelCheckpoint
@@ -121,7 +122,7 @@ def test_local_cross_device_checkpoint(tmpdir):
121122
mock.patch("os.rename", side_effect=OSError(errno.EXDEV, "Invalid cross-device link")),
122123
mock.patch("os.chmod", side_effect=PermissionError("Operation not permitted")),
123124
):
124-
if fsspec.__version__ < "2025.5.0":
125+
if compare_version("fsspec", operator.lt, "2025.5.0"):
125126
with pytest.raises(
126127
RuntimeError,
127128
match=re.escape(

0 commit comments

Comments
 (0)