mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 00:20:38 -09:00
package/python-crc: new runtime test
Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu> Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
committed by
Julien Olivain
parent
a0f094b067
commit
205dfb943a
7
support/testing/tests/package/sample_python_crc.py
Normal file
7
support/testing/tests/package/sample_python_crc.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from crc import Calculator, Crc8
|
||||
|
||||
expected = 0xBC
|
||||
data = bytes([0, 1, 2, 3, 4, 5])
|
||||
calculator = Calculator(Crc8.CCITT)
|
||||
|
||||
assert expected == calculator.checksum(data)
|
||||
Reference in New Issue
Block a user