Esempio n. 1
0
def test_delete_watched_directory(p):
    mkdir(p('dir'))
    inotify = InotifyBuffer(p('dir').encode())
    rm(p('dir'), recursive=True)

    # Wait for the event to be picked up
    inotify.read_event()

    # Ensure InotifyBuffer shuts down cleanly without raising an exception
    inotify.close()
def test_delete_watched_directory(p):
    mkdir(p('dir'))
    inotify = InotifyBuffer(p('dir').encode())
    rm(p('dir'), recursive=True)

    # Wait for the event to be picked up
    inotify.read_event()

    # Ensure InotifyBuffer shuts down cleanly without raising an exception
    inotify.close()
Esempio n. 3
0
def test_unmount_watched_directory_filesystem(p):
    mkdir(p('dir1'))
    mount_tmpfs(p('dir1'))
    mkdir(p('dir1/dir2'))
    inotify = InotifyBuffer(p('dir1/dir2').encode())
    unmount(p('dir1'))

    # Wait for the event to be picked up
    inotify.read_event()

    # Ensure InotifyBuffer shuts down cleanly without raising an exception
    inotify.close()
    assert not inotify.is_alive()