(fixtures)
| 451 | |
| 452 | |
| 453 | def 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 | |
| 472 | def test_local_diff_paths(fixtures): |
nothing calls this directly
no test coverage detected