2
1

test_python_pytest_asyncio.py 672 B

1234567891011121314151617181920
  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. _, exit_code = self.emulator.run(cmd, timeout=self.timeout)
  16. self.assertEqual(exit_code, 0)