mirror of
https://git.busybox.net/buildroot.git
synced 2024-11-23 05:23:39 +08:00
support/testing: add python-colorzero test
Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
185398f619
commit
dc5761beb0
@ -481,6 +481,8 @@ tests.package.test_python_cbor.TestPythonPy2Cbor: { extends: .runtime_test }
|
||||
tests.package.test_python_cbor.TestPythonPy3Cbor: { extends: .runtime_test }
|
||||
tests.package.test_python_click.TestPythonPy2Click: { extends: .runtime_test }
|
||||
tests.package.test_python_click.TestPythonPy3Click: { extends: .runtime_test }
|
||||
tests.package.test_python_colorzero.TestPythonPy2Colorzero: { extends: .runtime_test }
|
||||
tests.package.test_python_colorzero.TestPythonPy3Colorzero: { extends: .runtime_test }
|
||||
tests.package.test_python_constantly.TestPythonPy2Constantly: { extends: .runtime_test }
|
||||
tests.package.test_python_constantly.TestPythonPy3Constantly: { extends: .runtime_test }
|
||||
tests.package.test_python_crossbar.TestPythonPy3Crossbar: { extends: .runtime_test }
|
||||
|
8
support/testing/tests/package/sample_python_colorzero.py
Normal file
8
support/testing/tests/package/sample_python_colorzero.py
Normal file
@ -0,0 +1,8 @@
|
||||
from colorzero import Color
|
||||
|
||||
red = Color('red')
|
||||
green = Color('lime')
|
||||
blue = Color('blue')
|
||||
assert(red.rgb == (1.0, 0.0, 0.0))
|
||||
assert(green.rgb == (0.0, 1.0, 0.0))
|
||||
assert(blue.rgb == (0.0, 0.0, 1.0))
|
23
support/testing/tests/package/test_python_colorzero.py
Normal file
23
support/testing/tests/package/test_python_colorzero.py
Normal file
@ -0,0 +1,23 @@
|
||||
from tests.package.test_python import TestPythonPackageBase
|
||||
|
||||
|
||||
class TestPythonPy2Colorzero(TestPythonPackageBase):
|
||||
__test__ = True
|
||||
config = TestPythonPackageBase.config + \
|
||||
"""
|
||||
BR2_PACKAGE_PYTHON=y
|
||||
BR2_PACKAGE_PYTHON_COLORZERO=y
|
||||
"""
|
||||
sample_scripts = ["tests/package/sample_python_colorzero.py"]
|
||||
timeout = 30
|
||||
|
||||
|
||||
class TestPythonPy3Colorzero(TestPythonPackageBase):
|
||||
__test__ = True
|
||||
config = TestPythonPackageBase.config + \
|
||||
"""
|
||||
BR2_PACKAGE_PYTHON3=y
|
||||
BR2_PACKAGE_PYTHON_COLORZERO=y
|
||||
"""
|
||||
sample_scripts = ["tests/package/sample_python_colorzero.py"]
|
||||
timeout = 30
|
Loading…
Reference in New Issue
Block a user