1from tests.package.test_python import TestPythonPackageBase
2
3
4class TestPythonGpiozero(TestPythonPackageBase):
5    config = TestPythonPackageBase.config
6    sample_scripts = ["tests/package/sample_python_gpiozero.py"]
7
8    def run_sample_scripts(self):
9        cmd = self.interpreter + " sample_python_gpiozero.py"
10        output, exit_code = self.emulator.run(cmd)
11        self.assertEqual(exit_code, 0)
12
13        cmd = "pinout -r a020d3 -m | cat"
14        self.assertRunOk(cmd)
15
16
17class TestPythonPy3Gpiozero(TestPythonGpiozero):
18    __test__ = True
19    config = TestPythonGpiozero.config + \
20        """
21        BR2_PACKAGE_PYTHON3=y
22        BR2_PACKAGE_PYTHON_GPIOZERO=y
23        """
24