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

Function test_diff_same_renamed

tests/test_diff.py:228–248  ·  view source on GitHub ↗
(fixtures, tmp_path)

Source from the content-addressed store, hash-verified

226
227
228def test_diff_same_renamed(fixtures, tmp_path):
229 orig_pth = fixtures.path("diffs/1_a/src.py")
230 a_pth = tmp_path / "a.py"
231 os.symlink(src=orig_pth, dst=a_pth)
232 b_pth = tmp_path / "b.py"
233 os.symlink(src=orig_pth, dst=b_pth)
234
235 a_loc = ScanLocation(a_pth, strip_path=str(tmp_path))
236 b_loc = ScanLocation(b_pth, strip_path=str(tmp_path))
237
238 d = diff.DiffAnalyzer()
239 d.compare(a_loc, b_loc)
240
241 assert len(d.diffs) == 1
242 x = d.diffs[0]
243
244 assert x.operation == "M"
245 assert x.a_scan is a_loc
246 assert x.b_scan is b_loc
247 assert x.similarity == 1.0
248 assert x.diff is None
249
250
251def test_diff_file_added(fixtures):

Callers

nothing calls this directly

Calls 3

compareMethod · 0.95
ScanLocationClass · 0.90
pathMethod · 0.80

Tested by

no test coverage detected