MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / create_del_file

Function create_del_file

tests/test_diff.py:146–183  ·  view source on GitHub ↗
(pth: Path, fixtures)

Source from the content-addressed store, hash-verified

144
145
146def create_del_file(pth: Path, fixtures):
147 filename = "wheel-0.34.2.tar.gz"
148 file_pth = fixtures.path(f"mirror/{filename}")
149
150 assert os.path.exists(file_pth)
151
152 struct = []
153
154 dest1 = pth / "del_file/file_location/subdirectory" / filename
155 dest1.parent.mkdir(parents=True)
156 dest2 = pth / "del_file/empty_directory"
157 dest2.mkdir(parents=True)
158 os.symlink(src=file_pth, dst=dest1)
159 struct.append((
160 ScanLocation(dest1.parent),
161 ScanLocation(dest2),
162 {
163 "operation": "D",
164 "a_ref": filename,
165 "b_ref": None,
166 "a_size": 58330,
167 "b_size": 0
168 }
169 ))
170
171 struct.append((
172 ScanLocation(dest1.parent.parent),
173 ScanLocation(dest2),
174 {
175 "operation": "D",
176 "a_ref": f"subdirectory/{filename}",
177 "b_ref": None,
178 "a_size": 58330,
179 "b_size": 0
180 }
181 ))
182
183 return struct
184
185
186def create_similar_file(pth: Path, fixtures):

Callers

nothing calls this directly

Calls 3

ScanLocationClass · 0.90
pathMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected