test_python_gpiozero.py 684 B

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