test_python_pytest_asyncio.py 613 B

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