mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-14 05:53:47 -06:00
chore: merge tooling batch
This commit is contained in:
commit
b90f8bb0b9
116 files changed
+12868
-9741
No files matched your search
@@ -46,6 +46,25 @@ class FileShapeChecks(_Fixture):
|
||||
self.assertFalse(result.passed)
|
||||
self.assertEqual(result.sha1, "")
|
||||
|
||||
def test_a_path_never_read_shows_no_digest(self):
|
||||
"""Empty Size, SHA1, MD5 and CRC32 lines read as an empty file contributed."""
|
||||
result = validate_pr.validate_file("bios/nope.bin", None, EMPTY_HASHES)
|
||||
markdown = result.to_markdown()
|
||||
for label in ("**Size**", "**SHA1**", "**MD5**", "**CRC32**"):
|
||||
self.assertNotIn(label, markdown)
|
||||
self.assertIn("--changed", markdown)
|
||||
|
||||
def test_a_folder_is_read_file_by_file(self):
|
||||
self._bios_file("card/bios/a.bin")
|
||||
self._bios_file("card/bios/sub/b.bin")
|
||||
(self.tmp / "empty").mkdir()
|
||||
self.assertEqual(
|
||||
validate_pr.expand_folders(["card", "empty", "loose.bin"]),
|
||||
[str(Path("card/bios/a.bin")), str(Path("card/bios/sub/b.bin")), "empty", "loose.bin"],
|
||||
)
|
||||
result = validate_pr.validate_file("empty", None, EMPTY_HASHES)
|
||||
self.assertIn("Folder with no file in it", result.to_markdown())
|
||||
|
||||
def test_empty_file_fails(self):
|
||||
rel = self._bios_file("bios/Sony/PS/empty.bin", b"")
|
||||
result = validate_pr.validate_file(rel, None, EMPTY_HASHES)
|
||||
|
||||
Reference in new issue
Block a user