mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 13:51:33 +00:00
Fix inode creation issue on MacOS
This commit is contained in:
parent
a97a4f4b12
commit
2fb971d317
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user