From 81accf94ae5b5e4fb6281d28af2854be80dcce2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Tue, 2 Jul 2019 16:39:36 +0200 Subject: [PATCH] Fix inotify unit tests on BSD based systems --- lib/tfw/components/inotify/test_inotify.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tfw/components/inotify/test_inotify.py b/lib/tfw/components/inotify/test_inotify.py index aa910fe..d132706 100644 --- a/lib/tfw/components/inotify/test_inotify.py +++ b/lib/tfw/components/inotify/test_inotify.py @@ -7,6 +7,7 @@ from shutil import rmtree from os.path import join from os import mkdir, remove, rename from tempfile import TemporaryDirectory +from contextlib import suppress import watchdog import pytest @@ -18,7 +19,8 @@ from .inotify import ( InotifyDirMovedEvent, InotifyDirDeletedEvent ) -watchdog.observers.inotify_buffer.InotifyBuffer.delay = 0 +with suppress(AttributeError): + watchdog.observers.inotify_buffer.InotifyBuffer.delay = 0 class InotifyContext: