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

Function test_closure_archive_files

tests/test_diff.py:453–469  ·  view source on GitHub ↗
(fixtures)

Source from the content-addressed store, hash-verified

451
452
453def test_closure_archive_files(fixtures):
454 arch1 = fixtures.path("mirror/wheel-0.34.2-py2.py3-none-any.whl")
455 arch2 = fixtures.path("mirror/wheel-0.34.2.tar.gz")
456
457 loc1 = ScanLocation(arch1, strip_path=str(fixtures.BASE_PATH))
458 loc2 = ScanLocation(arch2, strip_path=str(fixtures.BASE_PATH))
459
460 closure = diff.FileMatcher(left_files=[loc1], right_files=[loc2]).get_closure()
461 assert len(closure["modified"]) == 1
462 x = closure["modified"][0]
463
464 assert x[0] == loc1
465 assert x[1] == loc2
466 assert x[2] > 0.0 # Similarity ratio
467
468 assert len(closure["added"]) == 0
469 assert len(closure["removed"]) == 0
470
471
472def test_local_diff_paths(fixtures):

Callers

nothing calls this directly

Calls 3

ScanLocationClass · 0.90
pathMethod · 0.80
get_closureMethod · 0.80

Tested by

no test coverage detected