MCPcopy
hub / github.com/gorakhargosh/watchdog / test_move_internal

Function test_move_internal

tests/test_inotify_buffer.py:55–65  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

53
54@pytest.mark.timeout(5)
55def test_move_internal(p):
56 mkdir(p("dir1"))
57 mkdir(p("dir2"))
58 touch(p("dir1", "a"))
59
60 inotify = InotifyBuffer(p("").encode(), recursive=True)
61 mv(p("dir1", "a"), p("dir2", "b"))
62 frm, to = wait_for_move_event(inotify.read_event)
63 assert frm.src_path == p("dir1", "a").encode()
64 assert to.src_path == p("dir2", "b").encode()
65 inotify.close()
66
67
68@pytest.mark.timeout(10)

Callers

nothing calls this directly

Calls 7

closeMethod · 0.95
InotifyBufferClass · 0.90
mkdirFunction · 0.85
touchFunction · 0.85
mvFunction · 0.85
wait_for_move_eventFunction · 0.85
pFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…