test_python_pytest.py 554 B

123456789101112131415161718
  1. import os
  2. from tests.package.test_python import TestPythonPackageBase
  3. class TestPythonPy3Pytest(TestPythonPackageBase):
  4. __test__ = True
  5. config = TestPythonPackageBase.config + \
  6. """
  7. BR2_PACKAGE_PYTHON3=y
  8. BR2_PACKAGE_PYTHON_PYTEST=y
  9. """
  10. sample_scripts = ["tests/package/sample_python_pytest.py"]
  11. def run_sample_scripts(self):
  12. for script in self.sample_scripts:
  13. cmd = self.interpreter + " -m pytest " + os.path.basename(script)
  14. self.assertRunOk(cmd, timeout=self.timeout)