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

Function test_move_from

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

Source from the content-addressed store, hash-verified

25
26@pytest.mark.timeout(5)
27def test_move_from(p):
28 mkdir(p("dir1"))
29 mkdir(p("dir2"))
30 touch(p("dir1", "a"))
31
32 inotify = InotifyBuffer(p("dir1").encode())
33 mv(p("dir1", "a"), p("dir2", "b"))
34 event = wait_for_move_event(inotify.read_event)
35 assert event.is_moved_from
36 assert event.src_path == p("dir1", "a").encode()
37 inotify.close()
38
39
40@pytest.mark.timeout(5)

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…