mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-30 13:28:51 -06:00
refactor: point tests at the packs modules
This commit is contained in:
1 parent
f48b66b540
commit
74207e25fc
50 files changed
+321
-259
No files matched your search
@@ -262,14 +262,14 @@ class SymlinksAreRefusedBeforeReading(_Fixture):
|
||||
link = self.tmp / "bios" / "Sony" / "PS" / "link.bin"
|
||||
link.symlink_to(self.tmp / "bios" / "Sony" / "PS" / "real.bin")
|
||||
calls = []
|
||||
real = validate_pr.compute_hashes
|
||||
validate_pr.compute_hashes = lambda p, *a, **k: (
|
||||
real = review.compute_hashes
|
||||
review.compute_hashes = lambda p, *a, **k: (
|
||||
calls.append(p) or real(p, *a, **k)
|
||||
)
|
||||
try:
|
||||
review.validate_file("bios/Sony/PS/link.bin", None, EMPTY_HASHES)
|
||||
finally:
|
||||
validate_pr.compute_hashes = real
|
||||
review.compute_hashes = real
|
||||
self.assertEqual(calls, [], "a symlink target must not be read")
|
||||
|
||||
@unittest.skipUnless(os.path.exists("/dev/zero"), "needs /dev/zero")
|
||||
|
||||
Reference in new issue
Block a user