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

Function test_move_replace

tests/test_snapshot_diff.py:80–90  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

78
79
80def test_move_replace(p):
81 mkdir(p("dir1"))
82 mkdir(p("dir2"))
83 touch(p("dir1", "a"))
84 touch(p("dir2", "b"))
85 ref = DirectorySnapshot(p(""))
86 mv(p("dir1", "a"), p("dir2", "b"))
87 diff = DirectorySnapshotDiff(ref, DirectorySnapshot(p("")))
88 assert diff.files_moved == [(p("dir1", "a"), p("dir2", "b"))]
89 assert diff.files_deleted == [p("dir2", "b")]
90 assert diff.files_created == []
91
92
93def test_dir_modify_on_create(p):

Callers

nothing calls this directly

Calls 6

DirectorySnapshotClass · 0.90
mkdirFunction · 0.85
touchFunction · 0.85
mvFunction · 0.85
pFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…