mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-03 07:21:45 -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)
|
||||
11
support/testing/tests/package/test_python_crc.py
Normal file
11
support/testing/tests/package/test_python_crc.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from tests.package.test_python import TestPythonPackageBase
|
||||
|
||||
|
||||
class TestPythonPy3Crc(TestPythonPackageBase):
|
||||
__test__ = True
|
||||
config = TestPythonPackageBase.config + \
|
||||
"""
|
||||
BR2_PACKAGE_PYTHON3=y
|
||||
BR2_PACKAGE_PYTHON_CRC=y
|
||||
"""
|
||||
sample_scripts = ["tests/package/sample_python_crc.py"]
|
||||
Reference in New Issue
Block a user