fix(pytest): skip file-lock test on Windows (#2138)

This commit is contained in:
Paul Rysiavets 2024-10-02 12:26:17 +02:00 committed by GitHub
parent 727dd112a3
commit ea6a160f6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -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(