From 2fb971d317e9a24c8f5a8fa81de40a0e5704fb0b Mon Sep 17 00:00:00 2001 From: "R. Richard" Date: Wed, 14 Aug 2019 16:05:55 +0200 Subject: [PATCH] Fix inode creation issue on MacOS --- .../pipe_io/pipe_connector/test_proxy_pipe_connector.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tfw/components/pipe_io/pipe_connector/test_proxy_pipe_connector.py b/tfw/components/pipe_io/pipe_connector/test_proxy_pipe_connector.py index 12a541a..3961b28 100644 --- a/tfw/components/pipe_io/pipe_connector/test_proxy_pipe_connector.py +++ b/tfw/components/pipe_io/pipe_connector/test_proxy_pipe_connector.py @@ -3,8 +3,9 @@ from enum import Enum from dataclasses import dataclass from json import dumps from secrets import token_urlsafe -from os import urandom, mkfifo, mkdir, mknod +from os import urandom, mkfifo, mkdir from os.path import join +from pathlib import Path from tempfile import TemporaryDirectory from tfw.internals.inotify import InotifyFileCreatedEvent, InotifyFileDeletedEvent @@ -141,13 +142,13 @@ def test_broadcast(mock_context): for path in paths: assert mock_context.pipes.recv_pipes[path].messages[-1] == payload - def test_inode_types(mock_context): + touch = lambda path: Path(path).touch() cases = [ (Action.RECV, mock_context.pipes.recv_pipes, mkdir), (Action.SEND, mock_context.pipes.send_pipes, mkdir), - (Action.RECV, mock_context.pipes.recv_pipes, mknod), - (Action.SEND, mock_context.pipes.send_pipes, mknod) + (Action.RECV, mock_context.pipes.recv_pipes, touch), + (Action.SEND, mock_context.pipes.send_pipes, touch) ] for action, pipes, creator in cases: