1
0
mirror of synced 2025-01-24 23:13:40 +01:00

utils.py: Remove now-unused checkMismatchedBytes func

This was initially used to validate the fumen writer to make sure it properly recreated the data from the fumen parser.

Any further byte-comparison will be done in a semantic way through pytest tests.
This commit is contained in:
Viv 2023-06-25 12:21:49 -04:00
parent 69af60e4e3
commit 6d8bfb97d5

View File

@ -261,16 +261,3 @@ def nameValue(*lists):
def debugPrint(*args, **kwargs): def debugPrint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs) print(*args, file=sys.stderr, **kwargs)
def checkMismatchedBytes(file1, file2):
with open(file1, 'rb') as file1, open(file2, 'rb') as file2:
data1, data2 = file1.read(), file2.read()
incorrect_bytes = {}
# Ignore header (first 432 + 80 = 512 bytes)
for i, (byte1, byte2) in enumerate(zip(data1[512:], data2[512:])):
if byte1 == byte2:
pass
else:
incorrect_bytes[hex(i+512)] = [byte1, byte2]
return incorrect_bytes