From 6d8bfb97d55476e1fd99cfaa9b2b2c128cef19a5 Mon Sep 17 00:00:00 2001 From: Viv Date: Sun, 25 Jun 2023 12:21:49 -0400 Subject: [PATCH] `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. --- src/tja2fumen/utils.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/tja2fumen/utils.py b/src/tja2fumen/utils.py index f076e41..eb51ec1 100644 --- a/src/tja2fumen/utils.py +++ b/src/tja2fumen/utils.py @@ -261,16 +261,3 @@ def nameValue(*lists): def debugPrint(*args, **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