mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-15 06:23:47 -06:00
fix: show no digest for a file never read
This commit is contained in:
1 parent
0c92fb6705
commit
7b6b22351a
2 files changed
+22
-8
No files matched your search
@@ -46,6 +46,14 @@ 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_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