From ea6a160f6bbe907899d7adc3b41879ac9f906208 Mon Sep 17 00:00:00 2001 From: Paul Rysiavets <1442562+spawn-guy@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:26:17 +0200 Subject: [PATCH] fix(pytest): skip file-lock test on Windows (#2138) --- t/unit/transport/test_filesystem.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/unit/transport/test_filesystem.py b/t/unit/transport/test_filesystem.py index a65b08dc..b5bca50e 100644 --- a/t/unit/transport/test_filesystem.py +++ b/t/unit/transport/test_filesystem.py @@ -1,7 +1,6 @@ from __future__ import annotations import tempfile -from fcntl import LOCK_EX, LOCK_SH from queue import Empty from unittest.mock import call, patch @@ -282,6 +281,9 @@ class test_FilesystemLock: pass def test_lock_during_process(self): + pytest.importorskip('fcntl') + from fcntl import LOCK_EX, LOCK_SH + producer = Producer(self.producer_channel, self.exchange) with patch("kombu.transport.filesystem.lock") as lock_m, patch(